随笔分类 - 小功能的实现
摘要:首先用pod引入第三方库: MMDrawerController 在podfile中填写 platform :ios, '7.0' pod 'MMDrawerController' 在AppDelegate中引入头文件 #import <MMDrawerController.h> #import "
阅读全文
摘要:自带shake API - (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event /** 检测到摇动 */ - (void)motionCancelled:(UIEventSubtype)motion withEven
阅读全文
摘要:// appstore的情况下,版本检查升级的处理 #define kShiperAppID @"AppStore中查看AppId" #define kURLLookup @"http://itunes.apple.com/cn/lookup?id=%@" #pragma mark - appSto
阅读全文
摘要:首先新建一个类:SplashViewController 还是直接贴代码: .h文件 #import <UIKit/UIKit.h> #import "UIButton+Bootstrap.h" @interface SplashViewController : UIViewController{
阅读全文
摘要://四舍五入 /** * 浮点型数据四舍五入 * * @param format 保留两位小数 传入@"0.00"; * @param floatV 字符数据 * * @return 四舍五入保留两位后的字符串 */ +(NSString *) decimalwithFormat:(NSString
阅读全文
摘要:设备标识 关于设备标识,历史上盛行过很多英雄,比如UDID、Mac地址、OpenUDID等,然而他们都陆陆续续倒在了苹果的门下。苹果目前提供了2个方法供App获取设备标识:idfa和idfv idfa:全称advertisingIdentifier,官方解释是广告标识,适用于广告推广,这个建议不要轻
阅读全文
摘要:NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"Using NSAttributed String"]; [str addAttribute:NSForegroundColorA
阅读全文
摘要:首先引入头文件: #import "sys/utsname.h" 代码实现: - (void)viewDidLoad { [super viewDidLoad]; struct utsname systemInfo; uname(&systemInfo); NSString *deviceStrin
阅读全文
摘要:#import "HelpToolsDataOrPhoneOrIDCard.h" @implementation HelpToolsDataOrPhoneOrIDCard + (NSString *)getTimeFromThatTime:(NSDateComponents *)componets{
阅读全文
摘要://手机序列号 NSString* identifierNumber = [[UIDevice currentDevice] uniqueIdentifier]; NSLog(@"手机序列号: %@",identifierNumber); //手机别名: 用户定义的名称 NSString* user
阅读全文
摘要:- (BOOL)isMobileNumber:(NSString *)mobileNum { /** * 手机号码 * 移动:134[0-8],135,136,137,138,139,150,151,157,158,159,182,187,188 * 联通:130,131,132,152,155,1
阅读全文
摘要:首先确定操作系统环境,不建议在 Windows 上面搞,所以你需要用: Mac OS X 任意 Linux 发行版本(Ubuntu,CentOS, Redhat, ArchLinux ...) 强烈新手使用 Ubuntu 省掉不必要的麻烦! 以下代码区域,带有 $ 打头的表示需要在控制台(终端)下面
阅读全文
浙公网安备 33010602011771号