
ios开发
周小小小三
苦逼程序员~~~~~~~
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
在ios应用中,获取uuid,并删除uuid中的-符号
CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault); NSString *uuid = (NSString *)CFBridgingRelease(CFUUIDCreateString (kCFAllocatorDefault,uuidRef)); //生成uuid代码如上 uuid = [uuid string原创 2014-12-23 09:42:09 · 973 阅读 · 0 评论 -
ios 获取当前屏幕快照
- (UIImage *)capture{ UIGraphicsBeginImageContextWithOptions(self.view.bounds.size,self.view.opaque,0.0); [self.view.layerrenderInContext:UIGraphicsGetCurrentContext()];原创 2015-03-05 16:37:30 · 836 阅读 · 0 评论 -
git 使用
本文翻译自Understanding Git Source Control in Xcode (译者myShire)欢迎您加入我们的翻译小组。 在应用程序开发过程中,很重要的一部分工作就是如何进行源码的版本控制。当代码出现问题时,我们就需要将代码恢复到原先正常的版本。如果是多个人共同开发一个项目,那么代码的控制就会非常复杂。幸运的是,开发者不需要自己控制这些,因为有专门的软件来负责转载 2015-03-13 14:18:02 · 466 阅读 · 0 评论 -
ios 真实随机数
srand((unsigned)time(0));//关键语句 CGFloat red = (CGFloat)(rand()%255); CGFloat green = (CGFloat)(rand()%255); CGFloat blue = (CGFloat)(rand()%255);原创 2015-03-13 13:36:59 · 456 阅读 · 0 评论 -
ios 判断一个nsstring 是否包含另一个 nsstring
NSString *str1 = @"hello kugou"; NSString *str2 = @"hello"; if ([str1rangeOfString:str2].location != NSNotFound) { NSLog(@"str1 iscontain str2"); } else {原创 2015-03-12 14:50:27 · 522 阅读 · 0 评论 -
消息推送,客户端需要调用的方法
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{ NSString *token = [[deviceTokendescription] stringByTrimmingCharacters原创 2015-03-10 18:04:00 · 384 阅读 · 0 评论 -
播放MP3音频和gif动画的一个小模块
//// GIFUseMode.m// WebView//// Created by 周三 on 15-3-3.// Copyright (c) 2015年 pluto. All rights reserved.//#import "GIFUseMode.h"#import @implementation GIFUseMode原创 2015-03-05 11:20:06 · 1337 阅读 · 0 评论 -
[iOS]如何向 appstore 查询已发布 APP 的信息?
如果我们需要实现版本的 app 自动更新,那么我们需要获取当前运行程序的版本信息和 appstore 里发布的最新版本信息。当前运行程序的版本信息,可以在 mainBundle 里面获取:[cpp] view plaincopyNSDictionary *infoDict = [[NSBundle mainBundle] in转载 2015-03-04 17:44:52 · 627 阅读 · 0 评论 -
IOS开发 如果图片太大的缩小算法,通用多种情况
- (CGSize)getSizeWithHeight:(CGFloat)height width:(CGFloat)width{ CGSize size = {0,0}; CGFloat fHeight = [UIScreenmainScreen].bounds.size.height; CGFloat fWidth = [UIScreenmainScr原创 2015-03-03 11:33:02 · 561 阅读 · 0 评论 -
ios 打印出所有的字体
NSMutableArray *fonts = [[NSMutableArrayalloc] init]; NSArray *family = [UIFontfamilyNames]; for (NSString *familyNamein family) { // NSLog(@"font family name = %@", fa原创 2015-01-04 15:37:55 · 733 阅读 · 0 评论 -
模拟电子表的功能
- (void)viewDidLoad{ [superviewDidLoad]; _timeLabel.textColor = [UIColorredColor]; _timeLabel.font = [UIFontsystemFontOfSize:13]; _timeLabel.backgroundColor = [UIColorcol原创 2014-12-23 11:39:17 · 491 阅读 · 0 评论 -
查看项目代码总行数
打开终端cd 你的项目复制下行命令回车就行find . "(" -name "*.m" -or -name "*.mm" -or -name "*.cpp" -or -name "*.h" -or -name "*.rss" ")" -print | xargs wc -l原创 2014-12-25 13:34:58 · 2200 阅读 · 0 评论 -
Label适应内容,改变高度
_commentLabel.text = commentLabelString;//这句要在算高度前 _commentLabel.font = [UIFontfontWithName:@"MicrosoftYaHei"size:16.0]; _commentLabel.numberOfLines =0;//这里设置为0表示,任意行数 _commentLab原创 2014-12-24 09:37:57 · 551 阅读 · 0 评论 -
UIImage 切圆
CAShapeLayer可以制作出任意的几何图形,把它作为UIImageView的遮罩,达到把图片做成圆形效果。利用CAShapeLayer可以制作出任意的几何图形,把它作为UIImageView的遮罩,达到把图片做成圆形效果。 //创建个人主页头部的用户头像 self.userHead = [[UIImageView alloc]initWithFram原创 2015-08-07 13:48:11 · 458 阅读 · 0 评论