01 2016 档案
摘要:- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{ return [self validNum:st
阅读全文
摘要:- (UIViewController*)getViewController{ for (UIView* next = [self superview]; next; next = next.superview) { UIResponder* nextResponder = [next nextRe
阅读全文
摘要:两种改变status bar状态的方法 一 :(全局的) 直接在当前控制器中(一般是在navigationcontroller) //- (UIStatusBarStyle)preferredStatusBarStyle{ // return UIStatusBarStyleLightContent
阅读全文
摘要:发现打上钩的话在plus以下的屏幕上控件的实际x会是-4但是在plus上是0,所以要设置一致的到视图的左右都未0 必须把Constrain to margins钩去掉!
阅读全文
摘要:在SB中控件可以在SB中直接利用kvc 设置一些属性值,不如layerwidth等 但是不能更改和颜色有关的属性因为layerbordercolor是CGColor.通过为CALayer增加属性可以实现在SB中也能用KVC设置layerbordercolor;新建CALayer的分类
阅读全文