摘要: 重写父类的init方法时,将init后面的第一个字母写成了小写,在这个方法里面又调用父类的初始化方法self = [super init];时会报错error:Cannot assign to 'self' outside of a method in the init family原因:只能在in... 阅读全文
posted @ 2014-09-13 22:32 2014_4_30 阅读(178) 评论(0) 推荐(0) 编辑
摘要: #pragma mark - 创建引导页+ (id)initWithFrame:(CGRect)frame{ return [[self alloc] initWithFrame:frame];}//- (id)initWithFrame:(CGRect)frame{ self = [s... 阅读全文
posted @ 2014-09-13 21:36 2014_4_30 阅读(142) 评论(0) 推荐(0) 编辑
摘要: #pragma mark - 创建旋转动画提示- (CustomView *)initIndicatorViewWithTitle:(NSString *)title{ self = [super initWithFrame:[[UIScreen mainScreen] bounds]]; ... 阅读全文
posted @ 2014-09-13 21:34 2014_4_30 阅读(103) 评论(0) 推荐(0) 编辑
摘要: #pragma mark - 将图片转为二进制+ (NSString *)image2binaryWithImage:(UIImage *)image imageName:(NSString *)imgName{ //获取图片的二进制数据 NSData *imageData = UIIm... 阅读全文
posted @ 2014-09-13 21:27 2014_4_30 阅读(555) 评论(0) 推荐(0) 编辑
摘要: #pragma mark - 获取按尺寸压缩过的新图片+ (UIImage *)getNewImageWithImage:(UIImage *)image size:(CGFloat)tempSize{ //获取图片的宽高 CGSize imageSize = image.size; ... 阅读全文
posted @ 2014-09-13 21:25 2014_4_30 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 从设备图库返回到scrollView时,scrollView会下移20像素,解决办法:self.edgesForExtendedLayout = UIRectEdgeNone; 如果加入此代码导致其他控件无法点击,可设置为其他值。tableView下移好像也可以用此方法。 阅读全文
posted @ 2014-09-13 21:15 2014_4_30 阅读(969) 评论(0) 推荐(0) 编辑
摘要: UIActionSheet *actionSheet = [[UIActionSheet alloc]initWithTitle:@"选择图片" delegate:(self) cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherB... 阅读全文
posted @ 2014-09-13 21:12 2014_4_30 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 1.在General中App Icons 使用Source--> AppIcon2.在Images.xcassets 中依次添加对应尺寸的icon.3.选中AppIcon ,在右侧第三个按钮下,勾选 iOS icon is pre-rendered.4.编译,运行,icon高光效果就没有了.如果还存... 阅读全文
posted @ 2014-09-13 21:10 2014_4_30 阅读(146) 评论(0) 推荐(0) 编辑