1. The data couldn’t be read because it isn’t in the correct format.
A:项目是2014年开发的,打包导出 Ad-hoc 时报上面的错误,Build Setting > Enable Bitcode > NO 之后再试成功了。
Reference:ipatool fails to build with bitcode (xcode 7.1.1)
2.setNeedsLayout vs. setNeedsUpdateConstraints and layoutIfNeeded vs updateConstraintsIfNeeded
A:
- If you manipulated constraints directly, call setNeedsLayout.
- If you changed some conditions (like offsets or smth) which would change constraints in your overridden updateConstraints method (a recommended way to change constraints, btw), call setNeedsUpdateConstraints, and most of the time, setNeedsLayout after that.
- If you need any of the actions above to have immediate effect—e.g. when your need to learn new frame height after a layout pass—append it with a layoutIfNeeded.
Reference:setNeedsLayout vs. setNeedsUpdateConstraints and layoutIfNeeded vs updateConstraintsIfNeeded
3.父类如何关联子类通过nib初始化的属性?
A: Select xib > Show Utilities > Show The Connection In Inspector > + > Connect to View
继续阅读