- 博客(5)
- 收藏
- 关注
原创 iOS_工厂类
UIButton的处理 UIButton+BaseButton.h // 快速BUtton生成 + (UIButton * _Nullable)buttonWithTitle:(NSString * _Nullable)title titleColor:(UIColor * _Nullable)titleColor titleFont:(UIFont * _Nullable)titleFont; + (UIButton * _Nullable)buttonWithTitle:(NSString * _Nul
2020-07-29 14:36:11 121
原创 iOS_常用宏定义
NLog处理 设置Build Setings -> Preprocessor Mecros -> Debug DEBUG=1 Build Build Setings -> Preprocessor Mecros -> Release #pragma mark - NSLog在release下不输出 #ifdef DEBUG #define NSLog(formater,...) NSLog((@"\n[文件名:%s] " "函数名:%s\n" "代码行数: %d " form
2020-07-29 12:20:17 176
原创 iOS_防止Button重复点击,添加点击时间间隔
UIButton+TJTime 方法实现 tj_acceptEventInterval 为button点击时间间隔,赋值后起作用 @interface UIButton (TJTime) /* 防止button重复点击,设置间隔 */ @property (nonatomic, assign) NSTimeInterval tj_acceptEventInterval; @end 引用设置 #import <objc/runtime.h> static const char *UIB
2020-07-29 11:47:43 438
原创 iOS_键盘弹出输入框上移
监听键盘出现消失消息 - (void)addKeyboardShowViewChange { //增加监听,当键盘出现或改变时收出消息 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil]; //增加监听,当键退出时收出消息 [[NSNotifi.
2020-07-29 11:36:56 490
转载 iOS_获取当前显示的页面
iOS_获取当前显示的页面 UINavigationController 中有visibleViewController和topViewController visibleViewController 当前显示的控制器 topViewController 是某个导航栈的栈顶视图 visibleViewController跟导航栈没有关系,只是当前显示的控制器,也就是说任意一个导航的visibleViewController所返回的值应该是一样的 topViewController 是某个导航栈的栈顶视图,
2020-07-29 11:13:48 635
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人