每个都会涉及到一个知识点,后期会整理成一个一个模块
static inline void
HSNumbersViewCell.m文件中
static inline void HSNumbersAdjustRowView(UIView *self, HSNumbersRowView *rowView) {
if (@available(iOS 11.0, *)) {
rowView.frame =
CGRectMake(self.bounds.origin.x + rowView.edgeInsets.left, self.bounds.origin.y + rowView.edgeInsets.top,
self.bounds.size.width - rowView.edgeInsets.left - rowView.edgeInsets.right - self.safeAreaInsets.right - self.safeAreaInsets.left,
self.bounds.size.height - rowView.edgeInsets.top - rowView.edgeInsets.bottom);
} else {
rowView.frame = CGRectMake(self.bounds.origin.x + rowView.edgeInsets.left, self.bounds.origin.y + rowView.edgeInsets.top,
self.bounds.size.width - rowView.edgeInsets.left - rowView.edgeInsets.right,
self.bounds.size.height - rowView.edgeInsets.top - rowView.edgeInsets.bottom);
}
};
gitflow 流
AsyncDisplayKit文档
AsyncDisplayKit文档 AsyncDisplayKit文档
uiview 刷新机制 生命周期
iOS view如何刷新 ios uiview 如何刷新_IOS刷新view的几个方法
CGRect VIXLabelRect = [self.VIXLabel.text boundingRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:self.VIXLabel.font} context:nil];
[self.VIXLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.VIXBGView.mas_top);
make.left.equalTo(self.VIXBGView.mas_left);
make.bottom.equalTo(self.VIXBGView.mas_bottom);
make.width.mas_equalTo(ceilf(VIXLabelRect.size.width));
}];
masonry 更新及高阶使用
git 中忽略 UserInterfaceState.xcuserstate
正解--->:git 中忽略 UserInterfaceState.xcuserstate
MVC 实际案例讲解iOS设计模式——MVC模式
iOS架构模式(MVC/MVCS/MVP/MVVM/VIPER)
约束相关
自动化打包
jenkins + 蒲公英
git
mac端 sourceTree 解决remote: HTTP Basic: Access denied报错
UIView
setNeedsLayout和layoutIfNeeded看我就懂!
cocoapods私有化仓库
xcrun: error: unable to find utility "simctl" 错误解决方案
pod repo push LSHSpec LSHPodLib.podspec 时报错
The NAME.podspec specification does not validate参考下面的方法
The NAME.podspec specification does not validate
RAC
🔥🔥🔥 iOS开发技术要点汇总,核心功能配备文档。表情键盘布局、大文件分片上传、基于MVC的基类设计、MVVM+RAC实践、微信朋友圈实现方案等。
导入
pod 'ReactiveCocoa', :git => 'https://github.com/zhao0/ReactiveCocoa.git', :tag => '2.5.2'
//相关头文件导入
#import "RACSignal.h"
#import "RACSubscriber.h"
#import "RACDisposable.h"
#import "subAViewController.h"
#import "RACSubject.h"
#import "RACCommand.h"
#import <RACEXTScope.h>
#import "RACSubscriptingAssignmentTrampoline.h"
#import "NSObject+RACPropertySubscribing.h"
#import "UIControl+RACSignalSupport.h"
#import "NSNotificationCenter+RACSupport.h"
#import "NSObject+RACLifting.h"
相关demo参考 https://www.cnblogs.com/ningmengcao-ios/p/6803878.html
断言NSAssert()和NSParameterAssert区别和用处
《如何理解UIButton的imageEdgeInsets和titleEdgeInsets》修复图片错乱问题
_cmd代表当前selector
-(void)touchABC
{
NSLog(@"打印结果:%@",NSStringFromSelector(_cmd));
//打印结果:touchABC
}
Git回滚到历史节点(SourceTree篇)
xcode一直转圈
1.清除XCode的缓存,再重启XCode.
rm -frd ~/Library/Caches/com.apple.dt.Xcode/*
rm -frd ~/Library/Developer/Xcode/DerivedData
2.有些项目需要使用旧版编译系统,File-> workspace/project setting
xcode13 报错Cycle in dependencies between targets 'HSAWTableView' and 'HSLogicKit-7e8767..
十分钟学会Charles抓包(iOS的http/https请求)
library not found for -libstdc++.6.0.9
经常出现的路径找不到,经常变动,所以推荐用网上最新的路径吧
NSSetUncaughtExceptionHandler处理异常
iOS NSSetUncaughtExceptionHandler 方法 并存到本地或者上传到本地服务器
音视频处理
# iOS开发之UIImagePickerController(拍照和录像)
Use of undeclared identifier 'kUTTypeMovie'
PHAsset获取图片和获取视频,PHAsset转换为Data.封装等.!!!
UICollectionView
# UICollectionView设置header悬浮效果
# 坑爹的PHImageManager和PHImageRequestOptions
获取顶层视图
大概可以分为如下几种类型
- 根视图
- tabbarviewcontroller
- uinavigationViewcontroller
- presentedViewController
@implementation UIViewController (common)
+(void)load
{
}
//获取根视图
+ (UIWindow *)keyWindow{
UIWindow *foundWindow = nil;
NSArray *windows = [[UIApplication sharedApplication]windows];
for (UIWindow *window in windows) {
if (window.isKeyWindow) {
foundWindow = window;
break;
}
}
return foundWindow;
}
//获取顶层视图
-(UIViewController *)currentTopViewcontroller{
UIWindow *theWindow = [UIViewController keyWindow];
UIViewController *TopVC = theWindow.rootViewController;
while (TopVC.presentedViewController) {
TopVC = TopVC.presentedViewController;
}
if ([TopVC isKindOfClass:[UITabBarController class]]) {
UITabBarController *tabVC = (UITabBarController *)TopVC;
UIViewController *selectedVC = tabVC.selectedViewController;
if ([selectedVC isKindOfClass:[UINavigationController class]]) {
UINavigationController *navVC = (UINavigationController *)selectedVC;
TopVC = [navVC.childViewControllers lastObject];
}
else
{
TopVC = selectedVC;
}
}
else if ([TopVC isKindOfClass:[UINavigationController class]])
{
UINavigationController *navVC = (UINavigationController *)TopVC;
TopVC = [navVC.childViewControllers lastObject];
}
return TopVC;
}
@end
iOS链式编程之block作为返回值使用
iOS 文件大小转换成 KB、MB、GB 。。。
iOS--NSNotificationCenter多次接收问题的总结
# iOS 画三角形、圆形、矩形,一看就会那种
# ios实现颜色渐变的几种方法
# iOS 获取某个控件相对于屏幕的位置
NSInvocation
iOS系统3DTouch全解析
UIBezierPath
iOS开发之判断横竖屏
iOS-KVO(键值监听)
iOS 保持界面流畅的技巧
APNs调试工具Knuff介绍
iOS中获取各种文件的目录路径的方法
了解IOS沙盒... NSTemporaryDirectory()
UIWindow的windowLevel属性
【iOS】视频全屏退出后,导航栏向上偏移20
IOS10 Notification远程推送通知(三)
iOS 状态栏的隐藏显示与状态栏样式的设置
# iOS浮点数去掉小数点之后的0