Web前端最新iOS开发进阶(十七):PrefixHeader(1),老师讲的真棒

文末

技术是没有终点的,也是学不完的,最重要的是活着、不秃。

零基础入门的时候看书还是看视频,我觉得成年人,何必做选择题呢,两个都要。喜欢看书就看书,喜欢看视频就看视频。

最重要的是在自学的过程中,一定不要眼高手低,要实战,把学到的技术投入到项目当中,解决问题,之后进一步锤炼自己的技术。

自学最怕的就是缺乏自驱力,一定要自律,杜绝“三天打鱼两天晒网”,到最后白忙活一场。

高度自律的同时,要保持耐心,不抛弃不放弃,切勿自怨自艾,每天给自己一点点鼓励,学习的劲头就会很足,不容易犯困。

技术学到手后,找工作的时候一定要好好准备一份简历,不要无头苍蝇一样去海投简历,容易“竹篮打水一场空”。好好的准备一下简历,毕竟是找工作的敲门砖。

拿到面试邀请后,在面试的过程中一定要大大方方,尽力把自己学到的知识舒适地表达出来,不要因为是自学就不够自信,给面试官一个好的印象,面试成功的几率就会大很多,加油吧,骚年!

开源分享:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】

注1⚠️:因为 pch 文件在预编译后会将头文件缓存起来,再次编译时则不需要重新编译该文件中的内容,进而提升了编译速率。所以尽量不要将开发中共用性较低的文件或宏定义(宏定义可单独创建一个头文件进行存放,再将该宏文件引入至 pch)引入进 pch 文件中导致重复编译的操作,反而降低其速率使文件所带来的作用大大折扣。

注2⚠️:pch 文件的命名方式,建议以项目名称开头,例如项目名称为"TestDemo"则 pch 文件名称则为"TestDemo-Prefix",当然实际命名以用途为准。

.pch文件示例如下:

//
// Hello-Header.pch
//

#ifndef Hello\_Header\_pch
#define Hello\_Header\_pch

#define WEAKSELF typeof(self) \_\_weak weakSelf = self;
#define STRONGSELF typeof(self) \_\_strong strongSelf = self;
#define STRONGSELFFor(object) typeof(object) \_\_strong strongSelf = object;
#define kScreen [UIScreen mainScreen].bounds.size
#define kScreenWidth [UIScreen mainScreen].bounds.size.width
#define kScreenHeight [UIScreen mainScreen].bounds.size.height
#define HexCorlor(hexValue) [UIColor colorWithRed:((float)((hexValue & 0xFF0000) >> 16)) / 255.0 green:((float)((hexValue & 0xFF00) >> 8)) / 255.0 blue:((float)(hexValue & 0xFF)) / 255.0 alpha:1.0]

#define DEFAULTFRAME CGRectMake(0, 0, 1, 1)
#define BIGHEIGHT kScreen.width\*9/16
#define SMALLHEIGHT (kScreen.width/2)\*9/16

#define is\_iPhoneXSerious ({\
BOOL isPhoneX = NO;\
if (@available(iOS 11.0, \*)) {\
 UIWindow \*window = [[UIApplication sharedApplication].windows firstObject];\
 isPhoneX = window.safeAreaInsets.bottom > 0;\
}\
isPhoneX;\
})


#define is\_portrait ({\
BOOL is\_portrait = NO;\
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;\
is\_portrait = !UIInterfaceOrientationIsLandscape(orientation);\
is\_portrait;\
})

#define STATUS\_BAR\_HEIGHT (is\_iPhoneXSerious ? 44.f : 20.f)

#define NAVIGATION\_BAR\_HEIGHT (is\_iPhoneXSerious ? 88.f : 64.f)

#define TAB\_BAR\_HEIGHT (is\_iPhoneXSerious ? (49.f+34.f) : 49.f)

#define HOMEINDICATOR\_HEIGHT (is\_iPhoneXSerious ? 34.f : 0)

#define KViewRadius(View, Radius)\
\
[View.layer setCornerRadius:(Radius)];\
[View.layer setMasksToBounds:YES];\
[View.layer setShouldRasterize:YES];\
[View.layer setRasterizationScale:[UIScreen mainScreen].scale];

#define KViewBorderRadius(View, Radius, Width, Color)\
\
[View.layer setCornerRadius:(Radius)];\
[View.layer setMasksToBounds:YES];\
[View.layer setShouldRasterize:YES];\
[View.layer setRasterizationScale:[UIScreen mainScreen].scale];\
[View.layer setBorderWidth:(Width)];\
[View.layer setBorderColor:[Color CGColor]];

// notifacation
#define K\_NOTIC\_CENTER [NSNotificationCenter defaultCenter]
#define K\_Notic\_LogOutNative @"K\_Notic\_LogOutNative"
#define K\_Notic\_LoginSuccess @"K\_Notic\_LoginSuccess"

// Include any system framework and library headers here that should be included in all compilation units.
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.

#import <XYRTCEngine/NemoSDK.h>
#import <BPUIBaseComponents/BPBaseToastView.h>
#import <BPUIBaseComponents/BPBaseToastViewConfig.h>
#import "Masonry.h"

//#import "AppDelegate.h"
#import "XYConferenceHintView.h"
#import "XYAlertView.h"
#import "XYLocalString.h"

#import "XYFloatingManager.h"
#import "XYSDKManager.h"
#import "XYLayoutManager.h"

#import "UIView+XYFrame.h"
#import "UIColor+XYColor.h"
#import "NSDictionary+Utils.h"
#import "UIView+GradientView.h"
#import "UIView+Orientation.h"

#import "Masonry.h"
#import "XYHUDManager.h"

#define Font(key) BOCSystemFont((key))

#endif /\* Hello\_Header\_pch \*/


四、拓展阅读

总结

面试前要精心做好准备,简历上写的知识点和原理都需要准备好,项目上多想想难点和亮点,这是面试时能和别人不一样的地方。

还有就是表现出自己的谦虚好学,以及对于未来持续进阶的规划,企业招人更偏爱稳定的人。

万事开头难,但是程序员这一条路坚持几年后发展空间还是非常大的,一切重在坚持。

开源分享:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】

前端面试题汇总

JavaScript

前端资料汇总

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值