
IOS开发
文章平均质量分 54
海原浪子
iOS开发者,若有问题,qq312206577
展开
-
The entitlements specified in your application’s Code Signing Entitlements file do not match those s
真机调试报错:The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile. (0xE8008016).请在PROJECT与TARGETS里的build setting下的provi原创 2016-07-29 10:17:28 · 4911 阅读 · 0 评论 -
UICollectionViewCell 布局
//定义每个Item 的大小- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{ return CGSizeMake(原创 2015-01-31 10:51:17 · 7603 阅读 · 0 评论 -
iOS7 与 iOS8上 uisegementcontrol 设置image不显示问题
http://stackoverflow.com/questions/22407725/ios7-uisegmentcontrol-image-does-not-display图片初始化 [UIImage imageNamed:@"segment1.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]原创 2014-12-05 14:44:39 · 2305 阅读 · 0 评论 -
fatal error: file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Dev
类似这样的错误:fatal error: file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/U原创 2014-10-18 14:09:02 · 32271 阅读 · 6 评论 -
fmdb 数据库升级1-----增加表字段
NSString *sql = [NSString stringWithFormat:@"ALTER TABLE %@ ADD %@ text",TABLE_CARD,kScanCardPath]; [self.db executeUpdate:sql];原创 2014-11-19 15:11:54 · 11055 阅读 · 2 评论 -
页面间的数组传递注意问题
LDProductListViewController *productList = [[LDProductListViewControlleralloc]init]; productList.title =@"会员企业"; productList.product_companyType =LDIndustryMembersType; productL原创 2014-10-30 11:25:23 · 950 阅读 · 0 评论 -
*** Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:], /Source
*** Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:], /SourceCache/UIKit_Sim/UIKit-3318.16.14/UITableViewRowData.m:619*** Terminating app due to unca原创 2014-10-09 19:05:21 · 9817 阅读 · 0 评论 -
删除cell 报错*** Assertion failure in -[UITableView _endCellAnimationsWithContext:]
先remove数据,再执行 [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; 就对了。原创 2014-09-28 14:40:24 · 15317 阅读 · 0 评论 -
_locService = [[BMKLocationService alloc]init]; 我把这句话放在viewdidload 里,整个app不启动了,一直停留在启动页面
_locService = [[BMKLocationService alloc]init]; 我把这句话放在viewdidload 里,整个app不启动了,一直停留在启动页面,想想不应该出现这种问题,突然间原创 2014-08-18 17:41:02 · 4789 阅读 · 6 评论 -
ios6上,tabbar不显示
继承系统UITabbarController,为根控制器,在ios7上tabbar原创 2014-08-18 10:57:58 · 2031 阅读 · 0 评论 -
Unbalanced calls to begin/end appearance transitions for <UINavigationController: 0xac500c0>.
- (void)replaceController:(UIViewController *)oldController newController:(UIViewController *)newController container:(UIView *)container{ if (newController) { [self addChildViewControlle原创 2014-08-15 16:12:27 · 5675 阅读 · 2 评论 -
ld: 7 duplicate symbols for architecture i386 clang: error: linker command failed with exit code 1 (
找死了 找了半天,原来头文件包含了.m文件#import "LDCompanyHomeViewController.h"#import "LDProductAndCompanyCommonCell.m"#import "LDProductHomeCell.h"#import "LDRenMaiCell.h"#import "LDCompanyDynamicCell.h"原创 2014-09-11 11:52:40 · 5025 阅读 · 0 评论 -
iOS 图片base64编码 上传
一直上传不成功,搜了N遍,尝试了N遍,终于找到了一个相关的:你可以看一下你传到后台后的数据,看看是不是收到的数据跟你上传的数据不一样。base64编码之后,data里面会含有一些“+”,而“+”通过post传到后台后,会被转换成空格。这样后台就接收不到图片了。你可以让后台将收到数据的空格替换成“+”,或者你看看我写的一个解决方法的bloghttp://blog.youkuaiyun.com/wang790原创 2014-09-10 23:32:30 · 16945 阅读 · 2 评论 -
UINavigationController的title不显示
UINavigationController + UITabBarController 这两者一起用的情况下,UINavigationController的title不显示,我的问题在于把UITabBarController包在UINavigationController中了原创 2015-03-11 16:47:56 · 1885 阅读 · 0 评论 -
CLPlacemark 英文环境下获取中文信息
-(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations{ CLLocation *location = locations[0]; CLGeocoder *geocoder = [[CLGeocoder alloc]init];转载 2015-03-18 11:02:31 · 3740 阅读 · 0 评论 -
pch文件里含有的某些头文件未包含
由于我仅仅只是在target里添加了pch 而未在 project里添加,总是会在某些时候提示某些pch里的头文件未包含,多数情况下会正常,目前在两个地方同时添加,还未出现类似错误原创 2016-07-13 15:13:59 · 455 阅读 · 0 评论 -
application windows are expected to have a root view controller
application windows are expected to have a root view controller,奔溃,可能原因:1不能用setrootviewcontroller设置根目录,2在设置rootcontroller后,必须紧跟return yes,请注意,或许会有某些自动登录在didFinishLaunchingWithOptions里进行,根据请求成功与失败设置不同的原创 2016-06-14 17:01:29 · 686 阅读 · 0 评论 -
文章标题
UIImageView 设置图片不拉伸:1.aspectFill 与 clip subviews 同时勾选 2aspectFit原创 2016-05-09 14:09:43 · 368 阅读 · 0 评论 -
在 Xcode 7 中安装 Alcatraz,再次安装vvdocumenter
http://www.jianshu.com/p/0e7a36d2af4b转载 2016-05-15 19:00:28 · 900 阅读 · 0 评论 -
qq分享报 : EQQAPIAPPSHAREASYNC
preview image data is too big分享的图片太大,导致失败原创 2016-05-10 10:12:35 · 1454 阅读 · 0 评论 -
ios开发中,xib加载view,loadNibNamed方法奔溃原因之一
xib中某一属性在代码中已删除,但在xib中没有解除关联原创 2016-01-27 16:56:54 · 5514 阅读 · 0 评论 -
textfield的leftview不能重复
两个个textfiled的对象不能复值同一个leftview或者rightview,否则cpu立涨100原创 2015-10-15 16:26:13 · 792 阅读 · 0 评论 -
xib autolayout 左到右依次按内容长度排列
如图中 三个label,依次按所需内容从左到右等间隔排列,设置号约束后,左后一个label总是优先靠右,当我设置距右边边距的约束的priority为low250时,才满足需求,如此看来,距边界的边距约束优先级高于内部view之间的约束原创 2015-07-02 21:02:24 · 867 阅读 · 0 评论 -
某个地方 category 的方法不想用的解决方案
给cell添加了分割线的category,重写了drawRect 增加分割线,但在某个地方的table不想要分割线,即使设置了 self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;在ios6下,只要不包含category的头文件header就不会调用category中的方法,会满足无分割线的需求,原创 2015-06-18 16:13:06 · 789 阅读 · 0 评论 -
uiscrollview uicollectionview touch事件传递问题
uiscrollview uicollectionview 无法响应touch事件,解决方案,新建一个uiscrollview 的category@implementation UIScrollView (UITouch) - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {原创 2015-06-16 12:06:31 · 5744 阅读 · 0 评论 -
OC编译C++类库 出错
解决方法 网址:http://stackoverflow.com/questions/12968369/undefined-symbols-for-architecture-armv7-when-using-zxing-library-in-xcode-4-5问题描述:Undefined symbols for architecture armv7: "std::string::r原创 2015-04-06 02:51:49 · 1137 阅读 · 0 评论 -
IOS 推送 通知栏消息模式 显示demo字段,如何让demo字段变为应用名
在 info 里设置 bundle name 为 应用名原创 2015-04-02 14:48:15 · 2887 阅读 · 0 评论 -
nssting 编码问题
%3Cimg%20alt%3D%22%u5FAE%u7B11%22%20src%3D%22/anjiaoban/Themes/Scripts/xhEditor/xheditor_emot/default/smile.gif%22%20/%3E%3Cspan%20style%3D%22color%3A%23ff0000%3B%22%3E%u9648%u663E%u5B87%3C/span%3E%3C原创 2014-09-20 22:02:55 · 1314 阅读 · 0 评论 -
hidesBottomBarWhenPushed 使用
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ [tableView deselectRowAtIndexPath:indexPath animated:NO]; if (indexPath.row == 0) { LDMyHome原创 2014-09-05 17:00:40 · 3302 阅读 · 0 评论 -
iOS中消息的传递机制
注1:本文由破船[博客]译自Communication Patterns。本文目录如下所示:可用的机制做出正确的选择Framework示例 小结每个应用程序或多或少,都由一些松耦合的对象构成,这些对象彼此之间要想很好的完成任务,就需要进行消息传递。本文将介绍所有可用的消息传递机制,并通过示例来介绍这些机制在苹果的Framework中如何使用,同时,还介绍了一些最转载 2013-12-26 09:06:19 · 706 阅读 · 0 评论 -
iOS开发 简单实现视频音频的边下边播
直接切入主题,要实现的功能是:1、ios视频音频边缓存边播放,缓存时可以在已下载的部分拖拽进度条。2、缓存到一半退出,再次播放同一地址的视频时,视频继续下载,并且缓存进度已经走到上一次下载的位置。3、无论是下载到一半退出还是下载完退出,已缓存的数据都存到自己指定的一个路径。如果已下载完,下次播放时可以不再走网络,直接播放本地文件。4、一个有总时间,缓冲进度,播放进度转载 2013-12-25 16:10:27 · 30373 阅读 · 8 评论 -
UITabbarController点击tabbar选项返回当前viewController最顶层
转载地址:http://www.cnblogs.com/yeagen/archive/2012/03/09/2388151.html如果你的程序界面如上图所示的这个样子,那么你一定是同时使用了UITabBarController以及UINavigationController吧。再如果,你希望实现这样子的效果:1。用户起初在“分类”这个视图里面查看了一些菜系,2转载 2013-12-20 22:56:09 · 11090 阅读 · 1 评论 -
Choose a destination with a supported architecture in order to run on this device.
打开之前的项目时,出现这种问题解决办法:Project --> Build Settings --> Build 修改原创 2013-12-13 16:51:25 · 1019 阅读 · 1 评论 -
ios D-U-N-S Number(邓白氏编码)申请
其实很简单:1.点击链接:https://developer.apple.com/ios/enroll/dunsLookupForm.action2.填写相关信息,照着填就好了,没有英文名的就用拼音代替,主要是Legal Entity Name(公司名字)了,如:北京xxx科技有限公司 Beijing xxx technology co., LTDxxx换成拼音就好了3.信息填原创 2013-12-12 13:07:06 · 18649 阅读 · 1 评论 -
iOS开发 修改工程名
原址:http://m.blog.youkuaiyun.com/blog/jinglijun/8650987 在实际 中我们经常会遇到工程做到一半的时候要改app 的名字。 在xcode4之前在标题栏的“project”的下拉框里面选中“Rename” 就 ,然后输入你想要的 新名字 就ok了。 在xcode4之后更简单在,直接在工程的左边栏修改你的app 的名转载 2013-10-29 17:17:45 · 5931 阅读 · 0 评论 -
ios百度地图开发 BMKMapManager初始化crash问题解决办法
build Phases里设置 Other Linker Flags 为 -all_load.原创 2013-10-24 15:22:21 · 5493 阅读 · 0 评论 -
xcode5兼容低版本SDK
第一步:第二步:下载sdk 第三步:在build settings里设置第四步:很简单,不用在下载什么xcode4.6了原创 2013-10-06 15:01:50 · 4408 阅读 · 0 评论 -
举一个nspredicate来过滤array的例子,给你一个数字组成的NSArray,写一个predicate,将返回数组中的偶数。
NSMutableArray *a=[NSMutableArray arrayWithObjects:[NSNumber numberWithInt:1], [NSNumber numberWithInt:2], [NSNumber numberWithInt:3],原创 2013-05-13 10:52:13 · 896 阅读 · 0 评论 -
iOS中UI适配
iPhone5出来已经很久了,因为屏幕尺寸的改变,程序对于UI的灵活操控就显的尤为重要其实这次的总结还是用的老API中相关的属性,只不过以前我们没有深入的考虑,或者说是我没有深入考虑吧先从viewController的view说起吧(以下代码全部为ARC环境下)手动创建view都是从loadView方法中初始化viewController的self.view,这里说AP转载 2013-05-20 19:13:58 · 840 阅读 · 0 评论 -
关于CGRect
CGRect结构在屏幕上定义了一个矩形。它包含原点(rect.origin)和大小(rect.size)。需要了解以下CGRect函数。1、CGRectMake(origin.x,origin.y,size.width. Size.height)在代码中定义矩形。如:[imageView setFrame:CGRectMake(1,1,1,1)];如果获取它的本身框架是, CGFl转载 2013-04-16 17:08:00 · 974 阅读 · 0 评论