随笔分类 -  iOS开发

上一页 1 2
StoryBoard中,TableView位置总是在顶部出现空白的解决
摘要:重设TableView的 contentInset 属性可解决.
_tableView.contentInset = UIEdgeInsetsMake( -30, 0, 0, 0); 阅读全文
posted @ 2014-09-18 11:36 М80メ 阅读(394) 评论(0) 推荐(0)
StoryBoard中使用xib
摘要:转自:http://blog.csdn.net/li6185377/article/details/8131042一般自定义View 代码方式 有 在初始化的时候添加 子Views[cpp]view plaincopy-(id)initWithFrame:(CGRect)frame{self=[superinitWithFrame:frame];... 阅读全文
posted @ 2014-09-15 11:44 М80メ 阅读(352) 评论(0) 推荐(0)
iOS APP 架构漫谈[转]
摘要:Mark 一下 很不错的文章最近看了一些有关server的东西,一些很简单的东西,不外乎是一些文档规范,另外结合最近看的wwdc的一些video,觉得对软件架构(software architecture)认识又清楚了一些,这里记录下来。software architecture 听上去是一个很大的概念,实际上也包括很多东西,里面的争议也很多。在我看来软件架构最好放在小的场景中理解。问题1我... 阅读全文
posted @ 2014-09-12 10:06 М80メ 阅读(207) 评论(0) 推荐(0)
IOS下 UILabel 如何自动换行
摘要:转自:http://zasoft.blog.163.com/blog/static/205215176201301414915700/背景:相信很多朋友都遇到过,文本的内容长度不一,需要根据内容的多少来自动换行处理。场景:很多APP中评论,有的评论长,有的评论短,有的一行,有的多行。下面以评论的实现为例来说说具体如何实现。技术点:UILabel的自动换行,自动换行的同时要自适应Frame大小。... 阅读全文
posted @ 2014-08-18 20:29 М80メ 阅读(305) 评论(0) 推荐(0)
iOS 设置RGB色的宏
摘要:转自:http://lizhuang.iteye.com/blog/1931768
//RGB Color macro#define UIColorFromRGB(rgbValue) [UIColor \colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \green:((float)((rgbValue & 0xFF00) >> 8... 阅读全文
posted @ 2014-08-14 09:39 М80メ 阅读(339) 评论(0) 推荐(0)
iOS常用三方库收集
摘要:除非Pod可以直接加载到工程中的外,收集一下https://github.com/kejinlu/KKGestureLockView 好用的手势解锁 阅读全文
posted @ 2014-08-05 09:31 М80メ 阅读(129) 评论(0) 推荐(0)
ShareSDK中微信分享错误总结
摘要:项目中用到微信分享,可向好友或朋友圈分享链接时,分享人可以打开网站,查看消息者却始终不能打开网站.试了N种方法,重写了N次分享模块,均没办法解决.在无意中查看分享链接时发现,朋友圈里分享后,原始链接被拼接为了:http://www.xxx.com/?from=singlemessage&isappinstalled=0. 突然感觉胸毛狂抖,想起了什么!! 于是在代码中将原始链接改为:http://... 阅读全文
posted @ 2014-07-30 13:54 М80メ 阅读(1239) 评论(3) 推荐(0)
iOS推送的开启与关闭
摘要:开启:
[[UIApplication sharedApplication] registerForRemoteNotificationTypes: UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert];
关闭:
[[UIApplication sharedApp... 阅读全文
posted @ 2014-07-30 10:30 М80メ 阅读(604) 评论(0) 推荐(0)
phonegap 2.7 ios配置安装详细教程(2.9通用)
摘要:原地址:http://www.cnblogs.com/yansi/archive/2013/05/14/3078222.html在移动开发日益激烈的情况下我也不得不硬着头皮尝试下新鲜的html5的app(对于我这种小菜鸡这还是很新鲜的)。 一个很重要的问题就是配置phonegap,phonegap介绍网上一搜一大把,小弟就不赘述了,现在最新的phonegap版本是2.7,需要用命令行安... 阅读全文
posted @ 2014-07-18 10:46 М80メ 阅读(237) 评论(0) 推荐(0)
更改UISwitch大小
摘要:UISwitch大小总是改不了...找了一个简便方法.
mySwitch = [[UISwitch alloc] initWithFrame: CGRectMake( width - 55, height * .5 - 15, 100, 20)]; [mySwitch setOn: YES animated: YES]; mySwitch.transfo... 阅读全文
posted @ 2014-06-24 10:46 М80メ 阅读(2949) 评论(0) 推荐(0)
Xcode打包应用为ipa
摘要:Xcode教程Xcode4发布测试打包Archive操作是本文要介绍的内容,发布测试的最后一步打包(Archive),Xcode4帮助文档有比较详细介绍,但是居然是错的,这里说明一下。1、设置“BuildSettings”,下图是官方文档截图,留意那个红框,居然说反了。"Skipinstall"一定要选NO,否则在下面的打包步骤后,Organizer看不到你的程序,就为这折腾我好些时间,... 阅读全文
posted @ 2014-06-19 21:17 М80メ 阅读(495) 评论(0) 推荐(0)
更改App名称
摘要:Tochangetheinstalledapplicationname,inXcode:1.SelectyourTargetontheleftsideunderGroups&Files2.SelectFile>GetInfo3.SelecttheBuildtab4.FromtheConfigurationspopup,selectA... 阅读全文
posted @ 2014-06-19 21:13 М80メ 阅读(470) 评论(0) 推荐(0)
UIApplicationDelegate详解
摘要:每 个iPhone应用程序都有一个UIApplication,UIApplication是iPhone应用程序的开始并且负责初始化并显示 UIWindow,并负责加载应用程序的第一个UIView到UIWindow窗体中。UIApplication的另一个任务是帮助管理应用程序的生命 周期,而UIApplication通过一个名字为UIApplicationDelegate的代理类来履行这个任务。... 阅读全文
posted @ 2014-06-19 19:34 М80メ 阅读(641) 评论(0) 推荐(0)
App后台运行通知函数
摘要:[[UIApplicationsharedApplication] beginBackgroundTaskWithExpirationHandler: ^() { //程序在10分钟内未被系统关闭或者强制关闭,则程序会调用此代码块,可以在这里做一些保存或者清理工作 }]; 阅读全文
posted @ 2014-06-19 19:31 М80メ 阅读(173) 评论(0) 推荐(0)
清除UIWebView的缓存
摘要://清除cookies NSHTTPCookie *cookie; NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; for (cookie in [storage cookies]) { [storage deleteCookie:cookie]; ... 阅读全文
posted @ 2014-06-19 11:19 М80メ 阅读(216) 评论(0) 推荐(0)
iOS自定义NavigationBar
摘要:if (IS_IOS7()) { // NavigationBar 颜色 [[UINavigationBar appearance] setBarTintColor:HexColor(0xffffff)]; } else { self.nav... 阅读全文
posted @ 2014-06-03 21:22 М80メ 阅读(271) 评论(0) 推荐(0)
iOS7坐标上移44pt的解决
摘要:在iOS7中,引入一个新的属性,叫[UIViewController setEdgesForExtendedLayout:],它的默认值是UIRectEdgeAll.当容器为UINavigationController时,默认布局从NavigationBar的顶部开始.所以所有元素均上移了44pt.在确认为iOS7时,使用如下语句,即可让此问题修复.self.edgesForExtendedLay... 阅读全文
posted @ 2014-06-03 20:08 М80メ 阅读(345) 评论(0) 推荐(0)
iOS获取本机IP地址
摘要:自:http://stackoverflow.com/questions/7072989/iphone-ipad-osx-how-to-get-my-ip-address-programmatically #import #import // Get IP Address- (NSString *... 阅读全文
posted @ 2014-05-15 14:34 М80メ 阅读(341) 评论(0) 推荐(0)
更改navigationBar 颜色
摘要:if (IS_IOS7()) { /* iOS7 时 Navigation 颜色 */ [[UINavigationBar appearance] setBarTintColor: HexColor(0x7bae01)]; } else { ... 阅读全文
posted @ 2014-05-15 11:26 М80メ 阅读(437) 评论(0) 推荐(0)
自定义Navigation按钮及Title
摘要:导航栏自带的按钮,时常不能满足要求,所以深深需要进行各种定制.写一个UINavigationItem的category// UINavigationItem+CB_ChangeButton.h
@interface UINavigationItem (CB_ChangeButton)- (void) CB_SetRightButton:(UIButton *)button;- (void) CB_... 阅读全文
posted @ 2014-05-15 09:43 М80メ 阅读(303) 评论(0) 推荐(0)

上一页 1 2