2015年11月28日

IOS 自定义控件 跟随鼠标的圆点

摘要: 1 #import 2 3 @interface FKCustomView : UIView 4 5 @end 6 7 CustomView.m 8 #import "FKCustomView.h" 9 10 @implementation FKCustomView11 12 //定义两个... 阅读全文

posted @ 2015-11-28 17:01 程序修炼之道 阅读(446) 评论(0) 推荐(0) 编辑

简单同心圆效果

摘要: 1 #import "BNRHypnosisView.h" 2 3 @implementation BNRHypnosisView 4 - (instancetype)initWithFrame:(CGRect)frame 5 { 6 self = [super initWithFram... 阅读全文

posted @ 2015-11-28 16:57 程序修炼之道 阅读(400) 评论(0) 推荐(0) 编辑

ScrollView 分割屏幕效果

摘要: 1 CGRect screentRect = self.view.bounds; 2 CGRect bigRect = screentRect; 3 bigRect.size.width *= 2.0; 4 // bigRect.size.height *= 2.0; 5 ... 阅读全文

posted @ 2015-11-28 16:57 程序修炼之道 阅读(298) 评论(0) 推荐(0) 编辑

UITableViewController dequeueReusableCellWithIdentifier:indentifier forIndexPath:indexPath 报错

摘要: 添加这一句 [tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:indentifier]; 加入到初始化tableview时UITableViewCell *cell = [tableView dequeue... 阅读全文

posted @ 2015-11-28 16:43 程序修炼之道 阅读(355) 评论(0) 推荐(0) 编辑

关于指针变量编译和运行时

摘要: 指针变量编译时只能运行编译时的方法,不能调用运行时类型的方法,即使它实际所指对象确实包含该方法。Father* fa=[[Son alloc]init];编译时是:Father 运行时时:Son解决方法: 强制转换成子类类型,这样 编译和运行时的类型就相同了//下面编译时类型和运行时类型不一样,多态... 阅读全文

posted @ 2015-11-28 16:39 程序修炼之道 阅读(249) 评论(0) 推荐(0) 编辑

OC 如果需要手动显示操作 release retaionCount等解决办法

摘要: 错误提示:ARC forbids explicit message send of'retain''retain' is unavailable: not available inautomatic reference counting mode解决方法;打开当前工程,打开"Build Settin... 阅读全文

posted @ 2015-11-28 16:37 程序修炼之道 阅读(270) 评论(0) 推荐(0) 编辑

oc objc_msgSend报错解决办法

摘要: 错误代码:objc_msgSend(self.beginRefreshingTaget, self.beginRefreshingAction, self);Too many arguments to function call, expected 0, have 3选中项目 - Project -... 阅读全文

posted @ 2015-11-28 16:37 程序修炼之道 阅读(231) 评论(0) 推荐(0) 编辑

OC 出现中文乱码

摘要: @interface NSArray (Log)@end#import "NSArray+Log.h"@implementation NSArray (Log)- (NSString *)descriptionWithLocale:(id)locale{ NSMutableString *str =... 阅读全文

posted @ 2015-11-28 16:35 程序修炼之道 阅读(840) 评论(0) 推荐(0) 编辑

UITabBarItem中默认图片不显示的问题

摘要: [[UIImage imageNamed:@"recognize-1"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];以上方法进行设置图片,将不会以蓝/灰色进行覆盖,而是以默认图片进行设置 阅读全文

posted @ 2015-11-28 16:34 程序修炼之道 阅读(318) 评论(0) 推荐(0) 编辑

导航