我想用UIImagePickerController
用UIImagePickerControllerSourceTypePhotoLibrary
,但它说,"没有照片".模拟器从哪里获取图像?我应该在哪里复制图像,以便它们显示在模拟器中?
我正在使用自定义UITableViewCell,它有一些标签,按钮和图像视图可供显示.单元格中有一个标签,其文本是NSString
对象,字符串的长度可以是可变的.由于这一点,我无法设置恒定的高度到细胞中UITableView
的heightForCellAtIndex
方法.细胞的高度取决于这可以使用被确定标签的高度NSString
的sizeWithFont
方法.我尝试过使用它,但看起来我在某个地方出错了.怎么修好?
这是用于初始化单元格的代码.
if (self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier])
{
self.selectionStyle = UITableViewCellSelectionStyleNone;
UIImage *image = [UIImage imageNamed:@"dot.png"];
imageView = [[UIImageView alloc] initWithImage:image];
imageView.frame = CGRectMake(45.0,10.0,10,10);
headingTxt = [[UILabel alloc] initWithFrame: CGRectMake(60.0,0.0,150.0,post_hdg_ht)];
[headingTxt setContentMode: UIViewContentModeCenter];
headingTxt.text = postData.user_f_name;
headingTxt.font = [UIFont boldSystemFontOfSize:13];
headingTxt.textAlignment = UITextAlignmentLeft;
headingTxt.textColor = [UIColor blackColor];
dateTxt = [[UILabel alloc] initWithFrame:CGRectMake(55.0,23.0,150.0,post_date_ht)];
dateTxt.text = postData.created_dtm;
dateTxt.font = [UIFont italicSystemFontOfSize:11];
dateTxt.textAlignment = UITextAlignmentLeft;
dateTxt.textColor = [UIColor grayColor];
NSString * text1 …
Run Code Online (Sandbox Code Playgroud) 我有以下代码:
[replyAllBtn addTarget:self.target action:@selector(ReplyAll:) forControlEvents:UIControlEventTouchUpInside];
- (void)replyAll:(NSInteger)tid {
// some code
}
Run Code Online (Sandbox Code Playgroud)
如何向ReplyAll
函数发送参数?