摘要:
dealloc中[_x release]、[_x releae],_x=nil和,self.x = nil区别1、[_x release],_x = nil和self.x = nil等价 self.x = nil; OC中属性的设置器 设置器内部实现是这样的- (void)setX:(id)theX{ if (_x!=theX) { [_x release]; _x = [theX retain]; }} 所以self.x = nil,相当于[_x = relase],_x = [nil retain];2、[_x release]和[_x release],_x = nil区别 x 在rel 阅读全文
摘要:
代码:CGSize size = CGSizeMake(_lblContent.frame.size.width,10000); //设置宽高,其中高为允许的最大高度CGSize labelsize = [_lblContent.text sizeWithFont:_lblContent.font constrainedToSize:size lineBreakMode:UILineBreakModeWordWrap]; //通过文本_lblContent.text的字数,字体的大小,限制的高度大小以及模式来获取label的大小[_lblContent setFrame:CGRectMake( 阅读全文
摘要:
1、iphone选取本地照片方法UIImagePickerController *imagePickController = [[UIImagePickerController alloc]init];imagePickController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;//picker.allowsEditing = YES;imagePickController.delegate = self;[self presentModalViewController:imagePickController a. 阅读全文
摘要:
实现共享很简单,在info.plist文件中Add row,“Application supports iTunes files sharing”,值为true就OK; 阅读全文