自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(49)
  • 资源 (4)
  • 收藏
  • 关注

原创 Flutter 混编

前言:有iOS原生项目YJSchool(OC),想混编flutter项目(此项目是用as事先编好,功能都完善了)1、新建文件夹W,将YJSchool拷贝至W文件夹下,并创建一个flutter_module的moduleflutter create -t moduleflutter_module2、cd进YJSchool的podfile中写入:source 'https:...

2019-07-24 17:15:08 348

原创 Flutter 混编(Xcode)的坑

1、关闭bitcode2、File -> WorkSpace Setting -> Legacy build system3、若是插件中有swift实现的,但是原项目中是纯OC,可以新建个.swift 文件,然后create bridge ,并注意Build Settings中的swift的相关设置4、cd到文件夹下,新建flutter_module的flutter项目,...

2019-07-17 17:39:10 3300 1

原创 (iOS开发) 网络状态的监听,AFN

-(void)listenNetWorkingStatus { //1:创建网络监听者 AFNetworkReachabilityManager *managerafn = [AFNetworkReachabilityManager sharedManager]; //2:获取网络状态 [managerafn setReachabilityStatusChange...

2019-04-18 15:10:25 955

原创 (iOS开发)小提示,cell内缩高度

自定义cell中加入:- (void)setFrame:(CGRect)frame { frame.size.height -= 10; // 减掉的值就是分隔线的高度 [super setFrame:frame];} 

2018-10-30 10:57:43 198

转载 (iOS开发) .a文件的整合

$ lipo -create /Users/xxxxxx/lib/libv7.a /Users/xxxxxx/lib/lib64.a -output /Users/xxxxxx/lib/lib.a1、/Users/xxxxxx/lib/libv7.a2、/Users/xxxxxx/lib/lib64.a3、输出地址为/Users/xxxxxx/lib/lib.a...

2018-08-06 16:04:28 201

原创 (iOS) FFmpeg iOS 上的安装(可以指定任意版本) 一

一、准备部分1、去FFmpeg官网下载所需要的版本的源码:官网源码下载地址2、安装Homebrew: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"3、安装yasm: brew install yasm4、下载:https://github.com/libav/gas...

2018-04-26 17:05:16 1773

原创 (ReactNative) Tabbar + StackNavigator 的使用

设计思路:按照原生的开发经验,一般项目的架构模式都是:先以tabBar作为根,tabBar之下再放置navigationBar.但是React Native却相反.是先以navigationBar作为根,navigationBar之下再放置tabBar.这样的话push到二级界面就会自动隐藏tabBar了如果第二级页面还需要使用tabbar,就在第二级页面下面再次申明TabNavigator的用法...

2018-04-16 17:37:11 600

转载 (iOS 开发) 证书部分的博客转载

发现个前辈写的关于iOS证书的文章,很详细,在此留下个链接备注下:iOS证书详解链接

2017-09-12 14:56:14 255

原创 (iOS开发) coreData自主学习的坑Tips

1. 新建的.xcdatamodeld的名字不能和entity的名字重复,否则会读出问题2. coredata默认的是swift,需要的话需要手动改成OC3. Target Membership  需要钩中的情况下去Editor ,然后 ,Create NSManagedObject .. 创建4. 创建完了,build一遍, 然后再把 Target Membership 给取消钩中,

2017-05-17 17:56:32 482

原创 (iOS开发) 录屏功能的实现~包括暂停和继续功能

最近在pad上写了个录屏的项目,下面总结一下最近的收获:查看了下git上的不少的录屏的demo,好多没有实现暂停和继续的功能,当然我这个写的也有不少瑕疵,希望能提出来共同进步!一、需求:1、要求录屏的时候有暂停和继续功能2、对录制完的视频有做处理(获取第一帧图片,获取视频大小等等)二、实现:①、demo中的Lib文件夹的Recoder就是录制视频的相关文件

2017-01-13 16:41:57 15998 24

原创 (iOS开发) 往服务器上传视频

情景: 多选视频,然后打包成一个zip压缩包(里面有多个视频,一个json文件)一、先生成本地的文件:-(NSString *)getDocumentPath{ NSFileManager *fileManager = [NSFileManager defaultManager]; NSString *dic = [NSHomeDirectory() stringByAp

2017-01-09 17:35:07 3402

原创 (iOS开发) 动态cell高度

话不多说,直接上代码。一、用XIB来写:直接AutoLayOut拖拽1、首先,创建个带xib的cell,在cell上面放2个label2、给label 加上约束(ps:这边写的是2个lable都是动态的,因此不需要直接固定lable的高度),只需要约束以下lable1的左,上,右的距离,lable2的左,下,右的距离,然后再约束下lable1和lable2之间的距离就OK了,约

2016-11-01 11:33:39 429

原创 (iOS开发) 弹出选择相册图片以及之后的图片地址

1、首先需要遵循代理:UIImagePickerControllerDelegate2、PS:此方法适配iOS8之后,如果想用UIAlertView,请自己实现-(void)changeIcon:(UITapGestureRecognizer*)tap{ /** * 弹出提示框 */ //初始化提示框 UIAlertController *a

2016-11-01 09:56:47 4760

原创 (iOS开发)AutoLayOut中等比例设置视图

为了适应苹果的不同的屏幕,因此需要做屏幕的等比例适配!下面是简单的等比例适配的教程:下面是一个简单的让lable在cell中居中显示的案例1、创建自定义的cell的XIB文件,在此就不多说了。2、在xib上面放一个label:3、给TestLable添加个相对于父视图(cell的contentView)的Leading Space的约束4、点击如图显示的约束线条,就会出

2016-10-31 13:37:13 3633

原创 (iOS开发)百度地图SDK使用以及学习

一、环境的搭建1、下载百度地图SDK,地址:百度地图sdk下载2、注册账号、申请私钥:(注 :安全码就是 项目中的 Bundle Identifier)3、将下面的framework导入到自己的工程中去:4、还要引入一些需要的系统库文件:CoreLocation.framework、QuartzCore.framework、OpenGLES.framework、SystemCo

2016-10-26 14:37:49 1474

转载 (iOS开发) RunLoop与NSTimer的相关

在开发中经常会遇到这种情况,自己开启了个定时器,但是在某些情况下的时候,timer的方法不响应,但是timer仍然开启着;这种情况就是timer所在的Runloop暂时关闭了。一、RunLoop 与NSRunLoopCommonModes当nstimer 使用scheduledTimerWithTimeInterval方法的时候,此时的nstimer会被加入到当前的线程的RunLo

2016-10-17 11:41:27 449

原创 (iOS开发) 自定义悬浮按钮

前几天接到个需求:在项目中添加一个悬浮按钮,每个页面都显示,而且受到命令跳转界面的时候(受到socket命令然后跳转页面),这个悬浮按钮跳转出来的View要不消失。下面就是我的处理方法以及Demo:1、首先:思路:自己继承个UINavigationController 并将所有需要显示的视图申明一下(所有视图全部加载在UINavigationController的self.view上)

2016-10-14 13:56:28 5590

原创 (iOS开发) 导航栏一侧有多个按钮的处理

//导航栏一侧有多个按钮的时候//写成一个view上UIView * viewBackInNavi=[[UIView alloc]initWithFrame:CGRectMake(0, 0, 60, 30)];viewBackInNavi.backgroundColor=[UIColor clearColor];viewBackInNavi.userInteractionEnabled=Y

2016-10-10 17:01:21 2722

原创 (iOS开发)关于IOS9以后UIAlertView被UIAlerTController取代的有关问题

IOS 9 以后 UIAlertView就不被苹果所推荐使用了,因此苹果推出了 UIAlerTController来取代UIAlertView,下面介绍下UIAlerTController的使用方式。Tips:这个UIAlertController需要版本限制IOS8.0以上才可以使用UIAlertController* alert=[UIAlertCont

2016-10-10 10:41:02 836

原创 (iOS开发)iOS 9之后状态栏修改的方式

iOS 9之前是使用如下代码来设置状态栏的隐藏,修改样式[[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleBlackTranslucent animated:YES]; [[UIApplication sharedApplication]setStatusBarHidden:NO];但是,iOS 9之

2016-10-08 16:15:26 998

转载 (iOS开发)FFmpeg编译基础

1、下载:https://github.com/kewlbear/FFmpeg-iOS-build-script2、打开终端,cd到所在文件夹,在命令行输入:chmod +x build-ffmpeg.sh    然后./build-ffmpeg.sh(看是否要安装yasm)(这个是手机端的,不是tvos)3、将含有lib和include的FFmpeg-iOS文件夹重命名为

2016-09-23 15:36:22 424

原创 (iOS开发)横竖屏的使用和系统播放器的使用

必须这样声明,否则看不到@property (nonatomic, strong) MPMoviePlayerController *moviePlayer;//使用点方法来创建moviePlayer -(void)viewWillAppear:(BOOL)animated{ [self.moviePlayer play];//监听通知//将要进入全屏的通知[[NSNo

2016-09-23 15:34:33 928

原创 (iOS开发)IOS 9 APP版本检验更新和跳转

/** * 判断app安装版本和商店版本的比较 */-(void)judgeAPPVersion{ // https://itunes.apple.com/lookup?id=604685049 NSString *urlStr = @"https://itunes.apple.com/lookup?id=604685049"; NSURL *u

2016-09-23 15:33:33 1176

原创 (iOS开发)保存图片方法

// 1. 去图像路径 NSArray *docs = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *imagePath = [docs[0]stringByAppendingPathComponent:@"abc.png"];

2016-09-23 15:32:09 291

原创 (iOS开发)设置navigationbar的背景色以及title的字体颜色

// 设置导航栏的背景颜色 [self.navigationController.navigationBar setBarTintColor:[UIColor blackColor]];// 设置导航栏上的标题字体的颜色 [self.navigationController.navigationBar setTitleTextAttributes:@{UITextAt

2016-09-23 15:31:17 1848

原创 (iOS开发)storyBoard的简单使用

UIStoryboard * story=[UIStoryboard storyboardWithName:@"ListStoryboard" bundle:nil]; ListTableViewController * list=[story instantiateViewControllerWithIdentifier:@"list"]; list.navigationI

2016-09-23 15:30:37 598

原创 (iOS开发)刷新View的方法

[self viewWillDisappear:YES]; [self viewDidAppear:YES];-(void)viewWillDisappear:(BOOL)animated{ [super viewWillDisappear:animated]; while ([self.view.subviews lastObject] != nil) {

2016-09-23 15:29:55 4995

原创 (iOS开发)允许右滑等操作

-(void)viewDidAppear:(BOOL)animated{// 这一句实现了允许右滑手势 self.navigationController.interactivePopGestureRecognizer.enabled=YES;// 在自定义了返回按钮的情况下还能实现右滑手势 self.navigationController.interacti

2016-09-23 15:29:06 406

原创 (iOS开发)图片等实现360°旋转

-(void) startAnimation{ [UIView animateWithDuration:1.5 animations:^{ CABasicAnimation *fullRotation; fullRotation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"

2016-09-23 15:27:45 1565

原创 (iOS开发)根据字符串中的数值取出颜色

-(UIColor *)getColorFromString:(NSString *)colorString{ int colorInt=[colorString intValue]; if(colorInt<0) return [UIColor whiteColor]; NSString *nLetterValue; NSString *colo

2016-09-23 15:27:01 1447

原创 (iOS开发)判断字符串中是否含有非ASCII码字符

-(BOOL)passwdIsValidate{ NSInteger strlen = [_passWordTF.text length]; NSInteger datalen = [[_passWordTF.text dataUsingEncoding:NSUTF8StringEncoding] length]; if (strlen != datalen) {

2016-09-23 15:26:19 2702

原创 (iOS开发)统计含中英文混编的NSString 字符串长度

- (int)convertToInt:(NSString*)strtemp { int strlength = 0; char* p = (char*)[strtemp cStringUsingEncoding:NSUnicodeStringEncoding]; for (int i=0 ; i<[strtemp lengthOfBytesUs

2016-09-23 15:25:38 958

原创 (iOS开发)判断字符串中是否含有中文,字母

for (int i=0; i<strFrom.length; i++) { NSRange range =NSMakeRange(i, 1); NSString * strFromSubStr=[strFrom substringWithRange:range]; const char * cStringFromstr=[strFromSubStr UTF8String]

2016-09-23 15:24:53 2735

原创 (iOS开发)tableview自带的删除方法(8.0之后适用)

-(NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath{ UITableViewRowAction *action1 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActio

2016-09-23 15:23:48 1088

转载 (iOS开发)xcode 8和iOS 10中的有些问题解决

每次升级xcode之后,总会有改变,然后导致各种问题的出错。这次升级到xocde 8,仍然如此,在此贴上cocoaChina中的一个帖子,有些问题可以参考前辈们的解决方式,也可以留言。地址如下: http://www.cocoachina.com/bbs/read.php?tid-1696016.html

2016-09-23 15:20:21 487

原创 (iOS开发)修改UITextField中placeholder的字体大小,颜色

//UITextField修改placeholder的字体大小 ,颜色 NSString *holderText =@"Hello,world"; NSMutableAttributedString *placeholder = [[NSMutableAttributedString alloc]initWithString:holderText]; [placeho

2016-09-23 15:19:04 449

原创 (iOS开发)UIScrollView的使用以及注意事项

//1. 建立UIScrollView窗口,我们只打算用手机的上半屏显示图像,(这一步也可以在storyboard里完成)myScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320 , 300)];//2.建立内容视图UIImageView * view = [[UIImageView alloc] init

2016-09-20 16:28:33 319

原创 (iOS开发)导航栏navigationBar中间添加按钮

navigation bar 中间title变成button:self.navigationItem.titleView =button; UIButton * button =[UIButton buttonWithType:UIButtonTypeCustom]; button.frame=CGRectMake(20, 20, 100, 40); [button setTitle

2016-09-20 15:36:26 11121

原创 (iOS开发)计算时间差

//后来时间 NSDate *currentDate = [NSDate date];//获取当前时间,日期 NSInteger nowtime=[currentDate timeIntervalSince1970]; //间隔时间 NSInteger intervalSinceNow =[self distanceTimeWithBeforeTime:begint

2016-09-20 15:31:56 709

原创 (iOS开发)UIButton 半边圆角

//1、创建好myButton的各项//2、添加以下代码,实现半边圆角(下边的半边圆角)//3、想改变半边圆角,可以通过改变UIRectCornerBottomLeft | UIRectCornerBottomRight  UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:myButto

2016-09-20 15:15:14 4935 1

AFN2.0请求正文的解决方案

AFN2.0请求正文的解决方案!!!!!!!!AFN2.0请求正文的解决方案

2019-01-04

libjpeg32位64位集合(iOS arm64 armv7)

libjpeg32位64位集合(iOS arm64 armv7),里面有32位和64位等,具体.a文件的融合,请见我的博客:https://blog.csdn.net/wf990051004/article/details/81455900

2018-08-06

iOS录屏功能,有暂停和恢复功能

iOS录屏功能,有暂停和恢复功能。此项目是在iphone和ipad上的录屏的实现。

2018-04-26

UDP接收显示结果Demo

使用xmpp技术,通过获取UDP的数据在VC上显示,很实用

2015-11-17

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除