自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(37)
  • 收藏
  • 关注

原创 iOS-代码加载storyboard中的ViewController

UIStoryboard *gjwboard = [UIStoryboardstoryboardWithName: @"Main"bundle: nil];//Main你自己工程里面的Storyboard的名字       SLLightDeviceViewController * desVC = [gjwboardinstantiateViewControllerWi

2017-11-21 17:44:51 728

原创 使用CocoaPods给swift项目配置第三方swift框架

bogon:xiangmukaungjia ybd$ pod installAnalyzing dependenciesDownloading dependenciesInstalling Kingfisher (4.2.0)[!] Pods written in Swift can only be integrated as frameworks; add `us

2017-11-17 16:41:14 402

原创 [!] The version of CocoaPods used to generate the lockfile (1.3.1) is higher than the version of the

执行pod install时,提示如下信息:[!] The version of CocoaPods used to generate the lockfile (1.3.1) is higher than the version of the current executable (1.1.0.beta.1). Incompatibility issues may arise.[

2017-11-16 15:52:36 3098

原创 Lazy loading NSBundle MobileCoreServices.framework, Loaded MobileCoreServices.framework, System gr

Lazy loading NSBundle MobileCoreServices.framework,Loaded MobileCoreServices.framework,System group container for systemgroup.com.apple.configurationprofiles path is /Users/develop/Library/Dev

2017-11-14 18:42:14 6627

原创 AFN请求问题,{ Status Code: 404, Headers { "Content-Language" = (en); "Content-Length" = (1175);

//404,406除了参数,路径错了,有可能都是需要使用multipart/form-data格式提交{ Status Code: 404, Headers { "Content-Language" =    (en);"Content-Length" =    (1175);"Content-Type" =    ("text/html;charset=utf-8

2017-11-14 11:06:24 3203

原创 iOS 11出现的坑,Main Thread Checker: UI API called on a background thread: -[UIApplication statusBarOrien

2017-11-13 11:39:04.348973+0800 PlantsAndFlowers[11262:2146383] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication statusBarOrientation]PID: 11262, TID: 2146383,

2017-11-13 11:45:31 9187

原创 iOS11 自定义tabbar遇到的问题,删除系统自带tabbar按钮

自定义tabber,就是创建自己的tabbar盖在系统的tabbar上面              //自定义tabbar    GJWTabBar *customTabBar = [[GJWTabBaralloc] init];    customTabBar.frame = self.tabBar.bounds;    customTabBar.de

2017-11-13 11:34:36 1260

原创 使用CocoaPods给项目配置第三方框架

1、创建Podfile文件cd到工程目录,然后创建Podfile并且用vim编写mac-3:~ ybd$ cd /Users/ybd/Desktop/huisheng  mac-3:huisheng ybd$ touch Podfile  (创建Podfile)2、输入vim Podfile 就会进入编辑页面,但是还不可以编辑mac-3:huisheng y

2017-11-03 15:29:31 257

原创 "The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods i"解决方法

diff: /../Podfile.lock: No such file or directorydiff: /Manifest.lock: No such file or directoryerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your Coco

2017-10-19 16:20:25 846

原创 Xcode更新,解决RegexKitLite编译报错

Undefined symbolsforarchitecture i386:"_uregex_open", referenced from:_rkl_getCachedRegexinRegexKitLite.o"_uregex_groupCount", referenced from:_rkl_getCachedRegexinRegexKitLite.o

2017-10-18 11:52:01 360

原创 iOS 一些常用的位运算

功能                                            示例                                                           位运算 去掉最后一位                             (101101->10110)                                  

2017-08-26 10:09:14 725

原创 This application's application-identifier entitlement does not match that of the installed applicati

This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed解决方法:把你手机已经安装的app删掉。

2017-08-16 15:41:03 756

原创 ios button不能被点击

btn.userInteractionEnabled =NO;

2017-08-10 10:31:20 5615

原创 iOS UIButton 高亮变灰的效果去掉 的方法

第一种方法:[playBtnsetAdjustsImageWhenHighlighted:NO];// 默认是YES第二种方法:高亮的时候使用同一张图片,也是可以把变灰的效果去掉 [playBtnsetBackgroundImage:[UIImageimageNamed:@"play_btn_stop_n"]forState:UIControlS

2017-07-21 10:38:28 2333

原创 iOS 使屏幕常亮不黑屏

//常亮[[UIApplication sharedApplication] setIdleTimerDisabled:YES];//黑屏[[UIApplication sharedApplication] setIdleTimerDisabled:NO];

2017-07-18 15:52:39 1530

原创 iOS 电量条的隐藏&显示

进入单个VC后,无法将电量条隐藏。在plist文件中,加入View controller-based status bar appearance项,并设置为NO。这样,就能通过代码来显示&隐藏电量条。//显示 [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:NO];

2017-07-18 14:57:18 695

原创 去掉UIWebView底部的黑条

webView.backgroundColor = [UIColor whiteColor];//可以用[UIColor clearColor]webView.opaque = NO; //去掉底部黑色

2017-07-13 16:48:17 501

原创 The operation couldn’,An unexpected failure occurred while logging in (Underlying error code -1005).

The operation couldn’t be completed. Unable to log in with account '[email protected]'.An unexpected failure occurred while logging in (Underlying error code -1005).解决办法:我点击导航栏“Xcode”->"Pre

2017-07-13 15:48:21 2561

原创 iOS 删除本地文件

//删除本地文件    NSFileManager *fileManger = [NSFileManagerdefaultManager];//文件管理器    NSArray *paths =NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);    NSStr

2017-07-11 17:14:52 963

原创 判断一个对象是否存在对象数组中,遍历对象数组

NSArray *musicArr2 = [musicDao queryCurrdentDataWithandroidId:androidId]; //查询得到的对象数组MusicObj *musicObj = [[MusicObj alloc] init]; // 要判断的对象,因为这个对象在其他地方获取的,这里只是做个示范MusicObj *muObj = [[MusicO

2017-07-07 16:28:51 1957

原创 “gjw” is of a model that is not supported by this version of Xcode. Please use a different device.

今天真机运行碰见了这个问题(“gjw” is of a model that is not supported by this version of Xcode. Please use a different device.),发现将XCode重启后就可以真机运行了,碰见这个问题的朋友可以试下

2017-06-29 13:57:38 281

原创 embedded dylibs/frameworks are only supported on iOS 8.0 and later (@rpath/XCTest.framework/XCTest

ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/Developer/Library/Frameworks'ld: embedded dyli

2017-06-20 16:26:32 935

原创 UIScrollView滚动到指定页面

int _index;//你想指定的第几个页面    CGFloat imageW = scrollView1.frame.size.width;    // 指定页面    CGPoint position =CGPointMake(_index*imageW,0);    [scrollView1setContentOffset:positi

2017-06-10 14:04:22 2057

原创 wireshark抓包

1.先去百度下载2.把你的手機用数据线连接电脑,获取你手机的UDID3.打开终端,输入rvictl -s (UDID)Starting device 09c197e217e5e8a5f7895888d063cb48f923954c [SUCCEEDED] with interface rvi0这个就表示成功。4.然

2017-06-05 18:20:05 403

原创 iphone 各个设备的分辨率和对应的像素尺寸

iphone各个设备的分辨率和对应的像素尺寸 以及所用到的 在 Images.xcassets中的图片规格iPhone 4SScreen Size: 3.5 InchesResolution: 640 x 960 (Half: 320 x 480)iPhone 5Screen Size: 4.0 InchesResolution: 640 × 1136 (Half:

2017-06-03 15:51:20 1073

原创 iOS App打包测试的解决方法二

参考这位博主的http://blog.csdn.net/qq_15509071/article/details/70263955,再结合自己的实际操作

2017-06-03 15:40:35 887

原创 iOS App打包测试的解决方法一

直接Archive还是不行,用了另外一个方法去打包。1,先在项目的Target里的General进行设置,把Signing下的Automatically manage singing取消2,在Signing(Debug)和(Release)里的Provisioning Profile选中已经配置好的证书(Wildcard那种)3,直接Build项目(⌘b)4,Build完后

2017-06-03 15:36:38 276

原创 iOS版本更新

版本更新#pragma mark - 检查版本更新- (void)checkNewVersion {//    NSString *url = @"https://itunes.apple.com/cn/app/ya-zi-kan-hu-ji-qi-ren/id1067342148?mt=8";     NSString *url = @"http://itunes.apple

2017-06-03 15:28:07 358

原创 把视频数据写到文件里面去来分析

把数据写到文件里面去用vedioWriter = [[NSMutableDataalloc] init];    //获取文件路径    NSString *uidplist = [[NSStringalloc] initWithFormat:@"vediolist.text"];    NSArray *paths = NSSearchPathForDirectori

2017-06-03 15:21:00 282

原创 多张图片一起播放,动画

// 创建数组缓存图片用来动画- (NSArray *)ImgArray{    if (!_ImgArray) {        _ImgArray = [NSArrayarrayWithObjects:                     [UIImageimageNamed:@"camerairs1"],            

2017-05-27 14:59:54 624

原创 UIView逐渐变亮然后消失,动画

imaged = [[UIImageViewalloc] initWithFrame:CGRectMake(scrrenW*0.36,self.view.center.y-scrrenW*0.15,scrrenW*0.28,scrrenW*0.28)];    imaged.image = [UIImageimageNamed:@"logo2"];    [se

2017-05-27 14:53:23 1052

原创 导航栏变为透明,让黑线消失的方法

//    导航栏变为透明    [self.navigationController.navigationBarsetBackgroundImage:[UIImagenew] forBarMetrics:0];    //    让黑线消失的方法    self.navigationController.navigationBar.shadowImage=[U

2017-05-27 14:50:52 317

原创 导航栏变为透明

//    导航栏变为透明    [self.navigationController.navigationBarsetBackgroundImage:[UIImagenew] forBarMetrics:0];    //    让黑线消失的方法    self.navigationController.navigationBar.shadowImage=[U

2017-05-27 14:49:47 330

原创 获取设备的局域网IP

// 获取手机的ip    NSString *ip = [GJWIPHelperdeviceIPAdress];// 获取IP的.h文件#import @interface GJWIPHelper : NSObject+ (NSString *)deviceIPAdress;//获取设备局域网中IP地

2017-05-27 14:40:58 1060

原创 iOS 跳转到Wi-Fi设置界面

// iOS之前跳转到Wi-Fi设置界面的代码 在点击跳转的按钮动作中添加如下代码 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=WIFI"]]; 在项目中的info中添加 URL types添加 URL Schemes

2017-05-27 14:03:42 1068

原创 自定义导航栏左边按钮的位置靠左问题,右边按钮的位置靠右的问题

UIButton *leftBtn = [[UIButtonalloc]initWithFrame:CGRectMake(-10,0, scrrenW*0.05,44)];    [leftBtn setBackgroundImage:[UIImageimageNamed:@"btnBack"]forState:UIControlStateNormal];

2017-05-27 11:31:43 7415

原创 关于在self.navigationItem.titleView 中增加视图和改变frame的问题

NSArray *segeArray = [NSArrayarrayWithObjects:@"PHOTOS",@"VIDEOS",nil];    UISegmentedControl *segmentCtr = [[UISegmentedControlalloc] initWithItems:segeArray];    segmentCtr.selectedSeg

2017-05-27 11:15:55 1006

空空如也

空空如也

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

TA关注的人

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