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