这几天没事做,老板让封装一些今后能用得着的东西,但是感觉没什么可以封装的,我还没达到架构师那个级别。求高人指点一二,多谢大家!
PHPz2017-04-18 09:19:28
Network requests, unified processing of headers
Encapsulated model analysis
Nowadays, most functions are handled by some third-party frameworks, such as code to quickly modify the position of the view. Nowadays, it is rare to write it yourself.
- (void)setCenterX:(CGFloat)centerX {
self.center = CGPointMake(centerX, self.center.y);
}
高洛峰2017-04-18 09:19:28
I have been paying attention to these issues recently. In fact, it does not mean that everything must be rewritten by myself. For example, network request AFN refresh MJ. Anyway, thousands of stars on GitHub can be podd down, and then encapsulated with a layer to facilitate business calls. In the business Just encapsulate and rewrite the personalized requirements.
伊谢尔伦2017-04-18 09:19:28
In fact, there are three main parts
*Network library part
*Image cache part
*Data saving part
Other parts can be chosen by yourself.