14:动画效果的启动页 地址:https://github.com/IFTTT/JazzHands 15:iOS快速简单集成国内三大平台分享 地址:https://github.com/xumeng/XMShareModule
iOS屏幕适配教程 1.通过frame进行适配 在iOS早期开发,都是使用frame属性进行屏幕适配,需要多套代码,非常麻烦。 //使用frame添加控件view,并设置属性,但是只能使用指定屏幕尺寸
创建你的第一个iOS框架 作者:Jake Craige,时间:2016/1/7 翻译:BNCoding, 如有错误欢迎指出。 原文链接 如果你曾经试图去创建一个自己的iOS框架的话,你应该
iOS获取和监测设备基本信息——UIDevice的使用 //获取当前设备单例 + (UIDevice *)currentDevice; //获取当前设备名称 @property(nonatomic,readonly
iOS 开发时写的小小微博,高仿新浪微博首页
if(strpos($agent,'iphone') || strpos($agent,'ipad')) { $type ='ios'; } if(strpos($agent,'android')) { $type ='android';
oschina.net/u/2340880/blog/608560 iOS中播放gif动态图的方式探讨 一、引言 在iOS开发中,UIImageView类专门来负责图片数据的渲染,并且UIIm
来自: http://www.cocoachina.com/ios/20160126/15091.html 如何辨别项目中的中文字符串? 既然要替换项目中使用到的中文字符串,那么前提就必须要先
可以监听有电话来时候的一些状态 #import <coretelephony ctcallcenter.h=""> #import <coretelephony ctcall.h=""> -(void)detectCall { CTCallCenter *callCenter = [[CTCallCenter alloc] init]; callCenter.callEventHandler=^(
/////禁止全局 横屏 - (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{ return UIInterfaceOrientationMaskPortrait; } //横屏调整视图 - (void)layoutSubv
获取当前设备的IP地址和MAC地址: 1.导入相关库文件。 2.调用方法getIPAddress 调用方法getMacAddress。 // // GetForIPMac.m // Eric // // Created by Eric on 15-3-24. // Copyright (c) 2015年 yons. All rights reserved. // #import "GetForIP
JSON); } failure:nil]; [operation start]; 说实话,IOS中的写法真是繁琐,不过字面意思确实表达足够精确。 2,Swift中 若要使用AFN
//判断输入文本中字符串的长度 if ([self convertToInt:chooseRollTextField.text] > 20) { [self showToast:@"输入的角色名不能超过20个汉字或40个字符哦!"]; return; } - (int)convertToInt:(NSString*)strtemp { int strlength = 0; char* p = (c
['HTTP_USER_AGENT'], 'iPad')){ echo 'systerm is IOS'; }else if(strpos($_SERVER['HTTP_USER_AGENT'], 'Android')){
在- (BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions 里添加 self.window.rootViewController.view.alpha = 0; UIImageView *splashImageView = [[UIImageV
在IOS开发中,经常有限制图片文件大小的,有的用户图片很大,导致上传时间慢,造成问题。 如:微信分享中,如果图片的大小好像大于50kbytes,就分享失败,而且没有任何提示。 所以,我添加了两个函数:
ios UI数据库 sqlite小型数据库的增、删、改、查、排序 #import "table.h" @implementation table // 1.创建表 每一列之间用'
#import <AVFoundation/AVFoundation.h> - (BOOL)isHeadsetPluggedIn { AVAudioSessionRouteDescription* route = [[AVAudioSession sharedInstance] currentRoute]; for (AVAudioSessionPortDescription* desc in [
去掉状态栏尺寸 CGRect r = [ UIScreen mainScreen ].applicationFrame; r=0,20,320,460 屏幕尺寸 CGRect rx = [ UIScreen mainScreen ].bounds; r=0,0,320,480 状态栏尺寸 CGRect rect; rect = [[UIApplication sharedApplication]
//四舍五入 /** * 浮点型数据四舍五入 * * @param format 保留两位小数 传入@"0.00"; * @param floatV 字符数据 * * @return 四舍五入保留两位后的字符串 */ +(NSString *) decimalwithFormat:(NSString *)format floatV:(float)floatV { NSNumberFormatter