我找到了以下功能:
CFStringCapitalize
"将字符串每个单词中的第一个字符更改为大写(如果它是小写字母字符)."
void CFStringCapitalize (
CFMutableStringRef theString,
CFLocaleRef locale
);
Run Code Online (Sandbox Code Playgroud)
有谁知道如何将它与我的NSMutableString一起使用?
谢谢,
戈捷.
我无法设法使我的代码符号化...我读了"下面"的部分:
给定崩溃报告,匹配的二进制文件及其.dSYM文件,符号化相对容易.Xcode Organizer窗口有一个选项卡,用于显示当前所选设备的崩溃报告.您可以在此选项卡中查看外部收到的崩溃报告 - 只需将它们放在适当的目录中即可.这与第一部分中描述的Mac OS X目录相同.您连接的设备无关紧要,但放置崩溃报告的目录必须是系留和选定设备的目录.
没有必要将二进制文件和.dSYM文件放在任何特定位置.Xcode使用Spotlight和UUID来定位正确的文件.但是,有必要将两个文件放在同一目录中,并且此目录是Spotlight索引的目录.您的主目录中的任何位置都应该没问题.
但它对我不起作用......这就是我所做的:
其余的都应该是自动的,对吗?但崩溃日志尚未象征化......
任何评论欢迎.
干杯.
高堤耶.
到目前为止,我曾经创建自定义笔尖来制作我想要的单元格,但这一次,单元格的高度将从一个变为另一个,这样我就无法创建一个固定大小的单元格的笔尖.
所以我决定以编程方式创建它...是否正确的方式实现它?
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
UILabel *pseudoAndDate = [[UILabel alloc] initWithFrame:CGRectMake(0.0,0.0,320.0,20.0)];
[pseudoAndDate setTag:1];
[cell addSubview:pseudoAndDate];
[pseudoAndDate release];
}
CommentRecord *thisRecord = [comments objectAtIndex:[indexPath row]];
UILabel *label = (UILabel *)[cell viewWithTag:1];
[label setText:[NSString stringWithFormat:@"%@ | %@",thisRecord.author,thisRecord.date]];
return cell;
}
Run Code Online (Sandbox Code Playgroud)
或者..我在这里错过了什么?到目前为止它似乎不起作用;)
谢谢,
高堤耶.
作为IB的狂热爱好者,我创建了一个UIToolBar(当然在IB中)并添加了几个按钮.
到目前为止一切都那么好......但后来我尝试将它们各自移动到正确的位置,但IB不允许我这样做......每当我尝试滚动它们时,IB会将它们移回原来的位置!
有没有办法选择他们在IB的位置?
如果没有,你能给我一段代码让我以编程方式选择他们的位置吗?(感叹:D)
谢谢,
高堤耶.
iphone positioning interface-builder uitoolbar uibuttonbaritem
我的代码越多,我就越迷失...所以我决定为我(以及其他人)创建一个完全专注于内存管理的主题,不要浪费时间理解obj-c基础...我会将其更新为问了新问题!
以下是一些例子:
// myArray is property (retain)
myArray = otherArray;
//myArray isn't a property
myArray = otherArray;
//myArray is a property (retain)
myArray = [[NSArray alloc] init];
//myArray isn't a property
myArray = [[NSArray alloc] init];
Run Code Online (Sandbox Code Playgroud)
---所以,如果我明白了......当你把self.myArray放到Xcode上时,你告诉Xcode使用getter或setter,但是当你做myArray时,你对一切负责,对吧?
[求助] UPDATE1:之间是否有区别:
//myArray is a property
myArray = otherArray; // it is only a reference, releasing otherArray will imply releasing myArray
self.myArray = otherArray; // otherArray is sent a retain message so releasing otherArray will still keep myArray in memory
Run Code Online (Sandbox Code Playgroud)
---是的,有区别(见上面的评论)
[已解决] …
我想实现一个可以由我的项目的两个类使用的类.
一个是操纵'NewsRecord'对象.一个是操纵'GalleriesRecord'对象.
在另一个类中,我可以使用这两个对象中的一个,所以我做了类似的事情:
// header class
id myNewsRecordOrGalleriesRecord;
// class.m
// NewsRecord and GalleriesRecord have both the title property
NSLog(myNewsRecordOrGalleriesRecord.title);
Run Code Online (Sandbox Code Playgroud)
我得到:
error : request for member 'title' in something not a structure or union
Run Code Online (Sandbox Code Playgroud)
任何想法:D?
谢谢.
高堤耶
我该怎么办呢?
有没有办法让普通文本和链接在CSS中共享相同的样式?
请在下面找到一个例子:
div.test, div.test a
{
font-size:0.8em;
}
Run Code Online (Sandbox Code Playgroud)
我希望文本和链接能够获得相同的风格,但它没有按预期工作......
欢迎任何帮助.
干杯.
高堤耶.
iphone ×5
allocation ×1
cell ×1
crash ×1
css ×1
equals ×1
header ×1
inheritance ×1
logging ×1
nsarray ×1
objective-c ×1
organizer ×1
positioning ×1
properties ×1
retain ×1
reusability ×1
row ×1
uitableview ×1
uitoolbar ×1