摘要:
习惯了使用Xcode默认字体,不小心把字体改了怎么看怎么别扭,严重影响写代码的心情,有同样情况的童鞋看过来了... Xcode默认字体为San Francisco Mono字体(SF Mono)。 阅读全文
摘要:
1.在自定义的UITableViewCell子类中,如果layoutSubviews方法中重写没有调用父类方法:[super layoutSubviews],则会出现此情况。 2.模拟器在50%屏幕比例下,不能显示全部分割线,屏幕比例调到100%就可以全部显示。 也可以在simulator -> d 阅读全文
摘要:
解决方法一: 在自定义的NavigationController中添加如下代码: (void)viewDidLoad{ [super viewDidLoad]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@sele 阅读全文
摘要:
一、创建代码块 1.在书写@property属性的地方写下如下语句:@property (nonatomic,strong) <#Class#> *<#object#>; 2.选中上述语句,用鼠标左键拖到 下图中指示的代码片段在Xcode中的区域里,就新建了一个代码片段 屏幕快照 2016-09-2 阅读全文
摘要:
-(void)drawRect:(CGRect)rect{ CGContextRef cont = UIGraphicsGetCurrentContext(); CGContextSetStrokeColorWithColor(cont, RGB(238, 234, 252).CGColor); CGContextSetLineWidth(cont, 1); CG... 阅读全文
摘要:
if (img !=nil) { //获取图片的名字 __block NSString* imageFileName; NSURL *imageURL = [info valueForKey:UIImagePickerControllerReferenceURL]; NSLog(@"imgurl:% 阅读全文
摘要:
第一种方法: //设置了setBackgroundImage,再设置barTintColor不起作用 // self.navigationController.navigationBar.barTintColor = [[UIColor blackColor]colorWithAlphaCompon 阅读全文
摘要:
添加富文本属性: 阅读全文
摘要:
1.支付宝支付完成不回调:原因是创建url scheme的时候不能添加identifier ,否则url.host是跟官方给的demo中的"safepay"不一样的。 2.同时集成微信支付和支付宝支付,如何在回调方法中区分: 阅读全文
摘要:
1.用mas_makeConstraints的那个view需要在addSubview之后才能用这个方法 2.mas_equalTo适用数值元素,equalTo适合多属性的比如make.left.and.right.equalTo(self.view) 3.方法and和with只是为了可读性,返回自身 阅读全文