会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
黄增松的技术博客
2013年开始开发iOS(oc+swift+flutter) QQ:759952579
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
···
23
下一页
2025年3月20日
解释VIPER架构,并说明它的优缺点。 iOS
摘要: VIPER: View: 负责UI展示。 Interactor: 负责业务逻辑和数据获取。 Presenter: 负责处理View和Interactor之间的通信。 Entity: 数据模型。 Router: 负责导航和模块之间的通信。 优点: 职责分离清晰,易于测试和维护。 适合大型项目。 缺点:
阅读全文
posted @ 2025-03-20 09:49 黄增松
阅读(107)
评论(0)
推荐(0)
2025年3月19日
如何在运行时动态添加方法和属性? ios
摘要: 动态添加方法: 使用class_addMethod函数。 示例: void dynamicMethodIMP(id self, SEL _cmd) { NSLog(@"Dynamic method added!"); } class_addMethod([MyClass class], @selec
阅读全文
posted @ 2025-03-19 17:32 黄增松
阅读(51)
评论(0)
推荐(0)
手势返回失效 iOS
摘要: 自定义返回按钮,设置 setLeftBarButtonItem 后,系统的滑动手势返回会失效。 BaseNavigationController里,加下面的逻辑。 - (void)viewDidLoad { [super viewDidLoad]; self.interactivePopGestur
阅读全文
posted @ 2025-03-19 09:52 黄增松
阅读(57)
评论(0)
推荐(0)
scrollview侧滑返回手势失效 iOS
摘要: requireGestureRecognizerToFail 这个方法,是_scrollView等左滑手势失效后,再执行_scrollView内部的手势解决方案一(推荐) [_scrollView.panGestureRecognizer requireGestureRecognizerToFail
阅读全文
posted @ 2025-03-19 09:48 黄增松
阅读(61)
评论(0)
推荐(0)
2025年3月13日
单例怎么释放 iOS
摘要: 关键就在与onceToken的值,添加一个方法,将onceToken置为0 https://www.jianshu.com/p/16a5ee0f5efe
阅读全文
posted @ 2025-03-13 16:46 黄增松
阅读(30)
评论(0)
推荐(0)
2025年3月11日
微信分享立即返回app iOS
摘要: 微信分享通用链接配置 https://www.jianshu.com/p/040213c02f68 示例 https://www.xxx.com/apple-app-site-association { "applinks": { "apps": [], "details": [ { "appID"
阅读全文
posted @ 2025-03-11 12:17 黄增松
阅读(26)
评论(0)
推荐(0)
2025年3月6日
优雅解决iOS导航栏跳转或返回时不流畅,卡白条问题。
摘要: 正确的解决方式 https://blog.csdn.net/zyx980193917/article/details/103263217/ push pop 有导航跳无导航,跳有导航;无导航跳有导航,跳无导航;都平滑过渡 基类 var isShowNav = true 基类 override fun
阅读全文
posted @ 2025-03-06 17:37 黄增松
阅读(90)
评论(0)
推荐(0)
2025年2月27日
label根据文字长度改变字体大小 ios
摘要: UILabel提供了一个非常方便的属性adjustsFontSizeToFitWidth,当设置为true时,UILabel会自动调整其字体大小以适应其宽度。 UILabel *alabel = [[UILabel alloc] init]; alabel.frame = CGRectMake(0,
阅读全文
posted @ 2025-02-27 14:20 黄增松
阅读(63)
评论(0)
推荐(0)
2025年2月19日
导航使用手势滑动pop消失 ios
摘要: 最佳处理方式 https://www.cnblogs.com/huangzs/p/18755980 可以不看下面的了 https://blog.csdn.net/yz_lby/article/details/49082131 -(void)viewWillAppear:(BOOL)animated{
阅读全文
posted @ 2025-02-19 11:00 黄增松
阅读(34)
评论(0)
推荐(0)
2025年2月8日
检测链表中的环 swift
摘要: func hasCycle(_ head: ListNode?) -> Bool { var slow = head, fast = head while fast != nil && fast?.next != nil { slow = slow?.next fast = fast?.next?.
阅读全文
posted @ 2025-02-08 15:26 黄增松
阅读(17)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
···
23
下一页
公告