摘要: 我们用unity项目生成xcode工程后,我们自己可以做一些xcode的配置工作,比如资源拷贝、引用系统库、修改bulid setting信息等。 然后需要注意的是这个C#文件需要放到Editor目录下面,不然那会报错 using System.Collections; using System.C 阅读全文
posted @ 2020-04-17 15:11 kawerd 阅读(1347) 评论(0) 推荐(0) 编辑
摘要: (1)去掉字符串首尾空格的方法: NSString *str = [str stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; (2)去掉字符串首尾换行的方法: NSString *str = [str 阅读全文
posted @ 2020-01-08 11:59 kawerd 阅读(1919) 评论(0) 推荐(0) 编辑
摘要: /** 获取scrollView的长截图*/ - (UIImage *)getLongImage:(UIScrollView *)scrollView { UIGraphicsBeginImageContextWithOptions(scrollView.contentSize, NO, [UISc 阅读全文
posted @ 2019-12-27 17:22 kawerd 阅读(2325) 评论(0) 推荐(0) 编辑
摘要: 首先我们需要进行麦克风访问授权 AVAudioSessionRecordPermission permission = [[AVAudioSession sharedInstance] recordPermission]; //判断是否授权 if (AVAudioSessionRecordPermi 阅读全文
posted @ 2019-12-11 20:22 kawerd 阅读(922) 评论(0) 推荐(0) 编辑
摘要: 1、程序的五种状态Not Running:未运行。Inactive:前台非活动状态。处于前台,但是不能接受事件处理。Active:前台活动状态。处于前台,能接受事件处理。Background:后台状态。进入后台,如果又可执行代码,会执行代码,代码执行完毕,程序进行挂起。Suspended:挂起状态。 阅读全文
posted @ 2019-12-11 18:31 kawerd 阅读(2016) 评论(0) 推荐(1) 编辑
摘要: //后台进前台通知 UIApplicationDidBecomeActiveNotification [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didBecomeActive) name:UIA 阅读全文
posted @ 2019-12-11 18:29 kawerd 阅读(4809) 评论(0) 推荐(0) 编辑
摘要: 今天给大家讲述波浪效果的实现 直接上代码 #import <UIKit/UIKit.h> @interface HCLWaveAnimationView : UIView /** 振幅A */ @property (nonatomic, assign) CGFloat alpha; /** 角速度ω 阅读全文
posted @ 2019-11-26 11:54 kawerd 阅读(1196) 评论(0) 推荐(0) 编辑
摘要: 我们平常项目开发用的字体基本都是系统默认的,但有时候设计为了追求完美,会使用自定义字体(当然得公司有钱买了版权哈),下面给大家讲讲怎么集成添加第三方字体。 1、导入三方字体文件进工程 我们就行平常添加文件一样,将字体文件导入xcode工程内,一般字体文件是ttc/ttf/otf 如果测试需要可以去下 阅读全文
posted @ 2019-11-25 10:19 kawerd 阅读(6371) 评论(0) 推荐(0) 编辑
摘要: 判断横屏 if ([UIApplication sharedApplication].statusBarOrientation == UIDeviceOrientationLandscapeRight || [UIApplication sharedApplication].statusBarOri 阅读全文
posted @ 2019-11-15 17:50 kawerd 阅读(3320) 评论(0) 推荐(0) 编辑
摘要: 手机型号 像素 尺寸 宽高比 iPhone 4/4s 640 x 960 px 3.5英寸 0.6666 iPhone 5/5s/5c/SE 640 x 1136 px 4 英寸 0.5633 iPhone 6/6s/7/8 750 x 1334 px 4.7英寸 0.5622 iPhone 6P/ 阅读全文
posted @ 2019-11-11 10:14 kawerd 阅读(1705) 评论(0) 推荐(0) 编辑