• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
ArgenBarbie
博客园    首页    新随笔    联系   管理    订阅  订阅

随笔分类 -  iOS

1 2 3 下一页
Xcode - No architectures to compile for ...

摘要:Error: No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=arm64 arm64e, EXCLUDED_ARCHS=( arm64)). Solution: Remove 阅读全文
posted @ 2020-10-11 22:56 ArgenBarbie 阅读(211) 评论(0) 推荐(0)
点击任意位置隐藏键盘

摘要:给view加一个点击事件,点击时收起键盘: override func viewDidLoad() { super.viewDidLoad() let tap = UITapGestureRecognizer(target: self, action: #selector(self.dismissK 阅读全文
posted @ 2020-03-17 21:51 ArgenBarbie 阅读(223) 评论(0) 推荐(0)
UIButton设置按钮点击范围大于可视范围

摘要:自定义按钮类型CustomButton,继承UIButton,重写pointInside函数改变点击响应范围。 例如,按钮点击范围比实际高度上下增加6。 CustomButton.h CustomButton.m 阅读全文
posted @ 2019-12-02 13:36 ArgenBarbie 阅读(397) 评论(0) 推荐(0)
Unknown class xxx in Interface Builder file. / NSUnknownKeyException

摘要:Error: 2019-11-24 22:16:01.047997+0800 SingleViewDemo[22576:34699748] Unknown class FeedbackCell in Interface Builder file. 2019-11-24 22:16:01.058953 阅读全文
posted @ 2019-11-24 22:20 ArgenBarbie 阅读(207) 评论(0) 推荐(0)
可滚动UIStackView 竖向居中 / 横向右对齐

摘要:重点: 在scroll view和stack view之间加一个UIView。 竖向居中Tutorial: https://stackoverflow.com/questions/50766400/center-uiview-vertically-in-scroll-view-when-its-dy 阅读全文
posted @ 2019-11-01 11:37 ArgenBarbie 阅读(1363) 评论(0) 推荐(0)
横向滚动的UIStackView

摘要:https://medium.com/@mufakkharulislamnayem/scrolling-in-a-horizontal-uistackview-with-storyboard-e02a9aab555b 阅读全文
posted @ 2019-10-25 14:46 ArgenBarbie 阅读(333) 评论(0) 推荐(0)
Objective-C基础教程 笔记

摘要:一、对C的扩展 1. #import VS #include C语言使用#include语句通知编译器应在头文件中查询定义。 OC中也可以使用#include,但几乎不这么用,而是使用#import。 #import <Foundation/Foundation.h> (查看Foundation框架 阅读全文
posted @ 2019-02-28 13:48 ArgenBarbie 阅读(183) 评论(0) 推荐(0)
屏幕旋转

摘要:要在屏幕旋转之后进行的操作放在viewWillTransition的回调函数里。 viewDidLayoutSubviews可能多次被调用,或在其他地方被调用。 阅读全文
posted @ 2017-09-01 15:17 ArgenBarbie 阅读(245) 评论(0) 推荐(0)
判断屏幕方向

摘要:override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { let deviceOrientation = UIDevice.current.orientation if UIDeviceOrient... 阅读全文
posted @ 2017-08-24 12:59 ArgenBarbie 阅读(149) 评论(0) 推荐(0)
Swift的 convenience && designated init

摘要:http://www.th7.cn/Program/IOS/201603/789227.shtml 在 OC 中 init 方法是非常不安全的,没人能够保证 init 只被调用一次,也没有人保证在初始化方法调用以后实例的各个变量都完成初始化,甚至如果在初始化里使用属性进行设置的的话,还可能会造成各种 阅读全文
posted @ 2016-11-10 16:21 ArgenBarbie 阅读(3096) 评论(0) 推荐(0)
xcode报错http

摘要:问题: Xcode项目发送网络请求时,报错:“App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be c 阅读全文
posted @ 2016-10-31 23:07 ArgenBarbie 阅读(153) 评论(0) 推荐(0)
本地数据持久化方法

摘要:http://www.jianshu.com/p/86ea6da905cf http://www.cocoachina.com/industry/20130328/5908.html 1. 属性列表(plist)NSUserDefaults 属性列表是一种明文的轻量级存储方式,其存储格式有多种,最常 阅读全文
posted @ 2016-09-24 22:17 ArgenBarbie 阅读(1252) 评论(0) 推荐(0)
页面跳转方法

摘要:http://www.tuicool.com/articles/vErQFbf http://blog.csdn.net/liu975450858/article/details/50883601 1. modal模态跳转 presentViewController 2. navigation导航控 阅读全文
posted @ 2016-09-24 11:10 ArgenBarbie 阅读(259) 评论(0) 推荐(0)
iOS面试题

摘要:STAR法则,即为Situation Task Action Result的缩写,具体含义是: Situation: 事情是在什么情况下发生 Task: 你是如何明确你的任务的 Action: 针对这样的情况分析,你采用了什么行动方式 Result: 结果怎样,在这样的情况下你学习到了什么 ~~~d 阅读全文
posted @ 2016-09-23 23:33 ArgenBarbie 阅读(380) 评论(0) 推荐(0)
只能在主线程更改界面

摘要:问题: 在主线程之外的线程更改界面,会报错:This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird cras 阅读全文
posted @ 2016-09-19 18:21 ArgenBarbie 阅读(233) 评论(0) 推荐(0)
tableview调用reloadData()之后界面不刷新显示

摘要:解决方法: 查看是否有指定tableView的delegate和datasource。 self.tableView.delegate = self self.tableView.datasource = self 阅读全文
posted @ 2016-09-19 16:29 ArgenBarbie 阅读(2174) 评论(0) 推荐(0)
tableviewcell边距和设置值不符

摘要:解决方法: 将Table View Cell的Layout Margins由Default改为Explicit,然后修改上下左右的边距。 阅读全文
posted @ 2016-09-14 14:37 ArgenBarbie 阅读(271) 评论(0) 推荐(0)
添加文件夹但编译时仍找不到其中的文件

摘要:问题: 在工程中引入文件夹时,添加文件夹但编译时仍找不到其中的文件。此时xcode中文件夹的图标为蓝色,而工程中的文件夹应该为黄色。 解决方法: 引入的时候要选Add new group不要选create reference。否则该文件夹里的内容不会参与编译。 阅读全文
posted @ 2016-09-12 22:55 ArgenBarbie 阅读(371) 评论(0) 推荐(0)
模拟器的tableView的分割线不显示

摘要:只有iOS9和iPhone6 plus模拟器上TableView分割线不会显示。 原因: 由于iPhone6 plus的分辨率较高,开发的时候同常都使用command + 3 或者 command + 4 缩小模拟器显示,这个时候就相当于把plus的分辨率压缩了所以我们会看不到分割线。 解决办法: 阅读全文
posted @ 2016-09-12 09:43 ArgenBarbie 阅读(200) 评论(0) 推荐(0)
swiftlint升级

摘要:~/Opal/iOS/App (mike/lyrics) $ which brew/usr/local/bin/brew~/Opal/iOS/App (mike/lyrics) $ cd /usr/local/bin//usr/local/bin (master) $ git pull origin 阅读全文
posted @ 2016-09-12 09:41 ArgenBarbie 阅读(182) 评论(0) 推荐(0)

1 2 3 下一页
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3