摘要: 在系统自带的UILabel中是没有吸顶及吸底部的方法的(如果有请告诉我,我没找到),于是乎重写label 1 // 2 // gzhVerticalAlignmentLabel.h 3 // VerticalAlignmentLabel 4 // 5 // Created by 郭志贺 on 202 阅读全文
posted @ 2020-06-01 09:49 郭志贺 阅读(1919) 评论(0) 推荐(1)
摘要: 往往项目中经常出现此类需求 用户通过点击引导按钮可响应页面附带按钮的点击事件。 1 // 2 // gzhGuideView.h 3 // GuideView 4 // 5 // Created by 郭志贺 on 2020/5/29. 6 // Copyright © 2020 郭志贺. All 阅读全文
posted @ 2020-05-29 14:16 郭志贺 阅读(784) 评论(0) 推荐(0)
摘要: 话不多说,直接撸代码 1 // 2 // gzhCache.h 3 // cache 4 // 5 // Created by 郭志贺 on 2020/5/27. 6 // Copyright © 2020 郭志贺. All rights reserved. 7 // 8 9 #import <Fo 阅读全文
posted @ 2020-05-27 16:09 郭志贺 阅读(594) 评论(0) 推荐(0)
摘要: 一行代码搞定图片选择 // // gzhPhotoManager.h // 图片选择 // // Created by 郭志贺 on 2020/5/26. // Copyright © 2020 郭志贺. All rights reserved. // #import <Foundation/Fou 阅读全文
posted @ 2020-05-26 15:28 郭志贺 阅读(2752) 评论(0) 推荐(0)
摘要: 通过#import <objc/runtime.h>我们可以找到: 1 /** 2 * Returns a specified instance method for a given class. 3 * 4 * @param cls The class you want to inspect. 5 阅读全文
posted @ 2020-05-21 15:56 郭志贺 阅读(748) 评论(0) 推荐(0)
摘要: MD5: + (NSString *)md5:(NSString *)input { const char *cStr = [input UTF8String]; unsigned char digest[CC_MD5_DIGEST_LENGTH]; CC_MD5( cStr, (CC_LONG)s 阅读全文
posted @ 2020-05-20 15:55 郭志贺 阅读(396) 评论(0) 推荐(0)
摘要: 根据三大运营商出现的号段(号段来自百度百科) 判断是否是手机号 + (BOOL)isMobile:(NSString *)str { NSString *MOBILE = @"^1(3[0-9]|4[579]|5[0-35-9]|6[2567]|7[0-35-8]|8[0-9]|9[189])\\d 阅读全文
posted @ 2020-05-20 14:46 郭志贺 阅读(1163) 评论(0) 推荐(0)