摘要: UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; /** * 设置frame只能控制按钮的大小 */ btn.frame= CGRectMake(0, 0, 40, 44); [btn addTarget:self 阅读全文
posted @ 2016-04-23 11:48 optt 阅读(1694) 评论(0) 推荐(0) 编辑
摘要: UINavigationController先pop再push,push操作将无效 解决方案是: 1. 从self.navigationController.viewControllers中拿出需要保留的View Controller放到一个数组中 2. 向数组中添加需要push的View Cont 阅读全文
posted @ 2016-04-21 15:01 optt 阅读(499) 评论(0) 推荐(0) 编辑
摘要: (继承一个cell子类) 阅读全文
posted @ 2016-04-08 19:01 optt 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 附图: 阅读全文
posted @ 2016-04-08 15:24 optt 阅读(282) 评论(0) 推荐(0) 编辑
摘要: //progress@property (strong, nonatomic) UIProgressView *progressView; 阅读全文
posted @ 2016-03-25 12:03 optt 阅读(297) 评论(0) 推荐(0) 编辑
摘要: For a custom shadow image to be shown, custom background image must also be set with the setBackgroundImage:forBarMetrics: method. If the default back... 阅读全文
posted @ 2015-11-14 16:41 optt 阅读(364) 评论(0) 推荐(0) 编辑
摘要: 解决办法 [AVCaptureMetadataOutput setMetadataObjectTypes:]方法要在对话添加输出之后调用(swift:session?.addOutput(output)) 阅读全文
posted @ 2015-07-10 11:39 optt 阅读(972) 评论(0) 推荐(0) 编辑
摘要: 1.桥接头文件——xx-Bridge-Header.h swift和oc混编连接点,必不可少。swift工程或oc工程添加oc或swift时,Xcode提醒,建议手动添加。 注意引入文件后Xcode的target->build settings自动添加Swift Compiler * 项... 阅读全文
posted @ 2015-07-09 17:41 optt 阅读(1117) 评论(0) 推荐(0) 编辑
摘要: 一个词强大Xcode 5 + iOS 7免证书(iDP)真机调试与生成IPA全攻略 阅读全文
posted @ 2014-05-16 11:17 optt 阅读(152) 评论(0) 推荐(0) 编辑
摘要: cocos 2d 中的CCSprite 无法识别触摸操作,需要自定义类。 解决思想:找到触摸发生的那个点,判断其是否在sprite的矩形区域内 完整代码如下://MySprite.h文件#import "CCSprite.h"#import "cocos2d.h"//自定义类继承与CCSprite,实现CCTouchOneByDelegate协议@interface MySprite : CCSprite@property (nonatomic,copy) NSString* spriteName;//定义精灵名属性-(id)initWithName:( 阅读全文
posted @ 2014-03-20 18:23 optt 阅读(671) 评论(0) 推荐(0) 编辑