iphone
尸兄在开黑
对生活要有信心,才能多姿多彩。对事物的美好憧憬,才会对生活有趣。人生的时光有限,我们可做的事无限。年少时不多经历闯荡,老时何来昔日美好回忆与辉煌…记住我的话,挺起兄膛让我们为了珍贵的事物而奋斗吧!让我们与命运抗衡吧!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
ios自定义framework
ios自定义framework,生成framework后,真机调用dyld: Library not loaded:这个问题其实时我们在生成自己的framework时默认的生成方式时动态的,这样就有了可变性,真机上是找不到这个framework的,因此我们只需要修改生成方式为静态的就可以了。 具体步骤build settings 查找 mach修改Mach-o type...原创 2015-07-14 16:33:35 · 206 阅读 · 0 评论 -
获取iphone键盘所在view
UIView* kbView = nil; NSArray *ws = [[UIApplication sharedApplication] windows]; for(UIView *w in ws){ NSArray *vs = [w subviews]; for(UIView *v in vs){ ...2012-12-13 14:31:15 · 144 阅读 · 0 评论 -
目前最好用的IOS网易微博SDK
网易微博上的SDK看上去不太明了,小弟这里对其进行了简单的封装,让大家在使用的时候只需要调用 loin登录 或者 send发送微博即可,好东西共分享.2012-04-09 15:36:13 · 115 阅读 · 0 评论 -
ios开发小知识
ios开发小知识2(转自cc)退回输入键盘 - (BOOL)textFieldShouldReturn:(id)textField{ [textField resignFirstResponder];} CGRectCGRect frame = CGRectMake (origin.x,origin.y, size.width, size.height);矩形...原创 2012-07-17 14:18:10 · 273 阅读 · 0 评论 -
iPhone开发常见的错误
开始iPhone的Practise Project,其中有很多的问题,先记录起来,以免以后再犯: 1. EXC_BAD_ACCESS: 发生场景1:一个指针转了两次,release了两次,其实只要release一次就可以。或者用指针时避免到处赋值。 发生场景2:在一个View Controller A里动态加载另外一个View Contro...原创 2012-02-06 16:51:41 · 128 阅读 · 0 评论 -
UIWebView获取html内容
获取所有html:NSString *lJs = @"document.documentElement.innerHTML";获取网页title:NSString *lJs2 = @"document.title";UIWebView *lWebView = [self getCurrentWebView];NSString *lHtml1 = [lWebView stringByEvalua...原创 2012-06-08 22:04:07 · 136 阅读 · 0 评论 -
自定义 UIActivityIndicatorView
//view 沿中心点旋转 -1逆向旋转 1正向旋转 int direction = -1; CABasicAnimation* rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; rotationAnimation....2012-02-02 13:42:55 · 138 阅读 · 0 评论 -
CALayer 缩放动画
//放大 CAKeyframeAnimation* animation = [CAKeyframeAnimation animationWithKeyPath:@"transform"]; NSMutableArray *values = [NSMutableArray array]; [values addObject:[NSValue...2012-05-03 15:31:40 · 340 阅读 · 0 评论 -
CALayer 按指定的点 运动
CGMutablePathRef thePath = CGPathCreateMutable(); CGPathMoveToPoint(thePath,NULL,aLayer.position.x, aLayer.position.y - 10); CGPathAddCurveToPoint(thePath,NULL, ...2012-05-03 15:30:16 · 121 阅读 · 0 评论 -
获取iphone手机内存以及硬盘存储空间大小的问题
请问谁知道获取iphone手机内存以及硬盘存储空间大小的方法,,紧急求救啊。。。 小弟这里先谢谢了。。 问题已解决。 - (NSString *)commasForNumber:(long long) num { //Produce a peroperly formatted number string //Alternatively use ...原创 2011-03-29 18:07:32 · 282 阅读 · 0 评论 -
关于获取iphone手机信息相关
+ (NSUInteger) getSysInfo: (uint) typeSpecifier{ size_t size = sizeof(int); int results; int mib[2] = {CTL_HW, typeSpecifier}; sysctl(mib, 2, &results, &size, NULL, 0); return (...2011-03-29 10:35:09 · 135 阅读 · 0 评论 -
关于IOS App唯一标示
大家都知道苹果对于唯一标示管理做了多次调整,之前ios6未发布前我们都是使用udid来统计,后来ios6出现了,udid这个接口被苹果无情的封杀。但是这样难不倒程序员们,我们立刻想到了,使用mac地址+自己设定的key 做出md5,这样我们就可以了。但是ios7发布后,苹果又一次无情的对此进行了封杀。 那么我们怎么办了,这个问题必须解决啊,后来经过耐心查看api,发现我们可以使用ke...原创 2013-11-13 17:18:23 · 214 阅读 · 0 评论 -
sqlite for iphone
iphone开发中sqlite3的操作说明(转载)ibsqlite3.0.dylib文件地址: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.sdk/usr/lib/libsqlite3.0.dylib2,代码中的操作:那么接下来是代码了。1 首先获取iPhone上sqlite3的数...原创 2012-09-25 17:17:22 · 107 阅读 · 0 评论 -
iOS 画出不规则图形
以下为大家提供一种绘制不规则图形的方法,实现原理利用图像的遮盖。 //// 这种是路径遮盖法+ (UIImage*)maskImage:(UIImage*)originImage toPath:(UIBezierPath*)path{ UIGraphicsBeginImageContextWithOptions(originImage.size, NO, 0); ...2013-12-13 11:44:59 · 764 阅读 · 0 评论 -
ios内付费
近年来写了很多IOS的程序,内付费也用到不少,使用IOS的内付费实现起来比较麻烦,这里我写了一个简单的内付费包,希望对大家有帮助。 具体使用如下:这里的sender其实就是调用者,这里主要是为了回调使用。[KuroStoreApi kuroStoreProductId:@"产品ID" storeSender:self storeFinishCallBackBlock:^(Kur...2015-07-14 16:15:59 · 183 阅读 · 0 评论 -
UIColor 转 16进制颜色值
+ (NSString *)ToHex:(int)tmpid { NSString *endtmp = @""; NSString *nLetterValue; NSString *nStrat; int ttmpig = tmpid % 16; int tmp = tmpid / 16; switch (ttmpig) { ...原创 2014-04-25 15:27:51 · 247 阅读 · 0 评论 -
iOS 富文本控件
使用方式:NSString *t = [NSStringstringWithFormat:@"<a href=http://www.baidu.com ><font size = 22 color=#001100>百度 </font></a>"]; RTLabelComponentsStructure *component...原创 2014-04-25 15:24:27 · 123 阅读 · 0 评论 -
两个动画效果
// 心跳动画+ (void)heartbeatView:(UIView *)view duration:(CGFloat)fDuration{ [[selfclass] heartbeatView:view duration:fDuration maxSize:1.4fdurationPerBeat:0.5f];}+ (void)heartbeatView:(UIVi...原创 2014-04-25 15:19:06 · 161 阅读 · 0 评论 -
获取某一个class的私有Api
//知道怎么用私有api,要怎么获得 //要导入#import <objc/runtime.h> NSString *className = NSStringFromClass([UIView class]); //这里是uiview,可以改成自己想要的 const char *cClassN...原创 2014-04-25 15:17:28 · 148 阅读 · 0 评论 -
UIView 中加入的cocos2d,背景透明
要点是首先pixelFormat:kEAGLColorFormatRGBA8,必须有alpha层才能透明。然后view设置为透明glView.opaque = NO;[director setOpenGLView:glView];[self.viewController.view setBackgroundColor:[UIColor clearColor]];[self.viewControll...2015-05-11 11:54:10 · 223 阅读 · 0 评论 -
CCDataVisitor.h, #include <string> 'string' file not found
CCDataVisitor.h, #include <string> 'string' file not found 这个错误因为你的.m文件引用里.mm的文件,这里需要把.m改成.mm就可以了。2015-03-26 15:55:47 · 1133 阅读 · 0 评论 -
his device is no longer connected.
his device is no longer connected. 拔掉数据线,重启Xcode,再次连接数据线,OK原创 2015-01-15 15:09:03 · 421 阅读 · 0 评论 -
idfa检查
cd到工程目录下然后执行下面的命令grep -r advertisingIdentifier .原创 2014-05-07 15:29:53 · 149 阅读 · 0 评论 -
关于IOS,UIViewController屏幕旋转
关于ios上面旋转的问题,ios6以下我们大家都知道,- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfacOrientation这个函数在旋转的时候会进行调用,并且我们还可以手动设置屏幕方向:[UIApplicationsharedApplication].statusBarOr...2013-07-23 15:30:17 · 436 阅读 · 0 评论 -
iphone 开发播放歌曲文件并录制 边播边录
iphone 开发播放歌曲文件并录制 边播边录原创 2011-03-17 17:33:57 · 211 阅读 · 0 评论 -
关于iPhone 自动释放池
在程序中我们可能会遇到:比如开发一个歌曲播放器 这时候 在歌曲列表页面上我们要显示每首歌的图片,这里大家可能回去开一个线程去下载图片 但是这里有一个细节一定要注意那就是,自动释放池的范围 一定不要太大 也就是说须对每个下载操作开辟一个自动释放池,否则将出现内存不断上涨的问题,如果这个列表有很多 那么最终将导致程序挂掉。...2011-07-20 14:44:16 · 98 阅读 · 0 评论 -
iphone openurl
[ UIApp openURL: [ NSURL URLWithString:@"http://www.apple.com" ] ]; iPhone还包含一些其他除了http://或者mailto:之外的URL:sms:// 可以调用短信程序tel:// 可以拨打电话itms:// 可以打开MobileStore.appaudio-player-event:// 可以打开i...原创 2011-09-15 16:45:49 · 103 阅读 · 0 评论 -
iPhone 抽屉功能
//// TestBedController_001.m// PDF_Reader//// Created by mir on 11-4-15.// Copyright 2011 __MyCompanyName__. All rights reserved.// #import "TestBedController_001.h" ...原创 2011-08-24 15:26:31 · 372 阅读 · 0 评论 -
iPhone手机截屏
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.- (void)viewDidLoad { [super viewDidLoad]; UITestView *testView=[[UITestView alloc] initWithFra...原创 2011-08-24 15:22:23 · 468 阅读 · 0 评论 -
iPhone 定位到当前位置
在地图上显示自己当前所在的位置。 //// UserLoactionTestViewController.m// UserLoactionTest//// Created by mir on 11-8-14.// Copyright __MyCompanyName__ 2011. All rights reserved.// #import "...原创 2011-08-24 15:18:06 · 142 阅读 · 0 评论 -
iPhone控制键盘
有时候当键盘弹出时会把输入框盖住,这时候我们就没法看到自己到底输入的是什么了,这时候我们就需要注册两个事件,那就是在键盘显示的时候 把输入框的位置放在可见的地方 ,当关闭键盘时,在将输入框还原,以下就是解决问题的具体方法,我们只要注册就可以了 // Call this method somewhere in your view controller setup code.- (v...原创 2011-08-24 15:15:56 · 150 阅读 · 0 评论 -
iPhone闹钟
前段时间看了下iPhone的简单推送,发现可以做闹钟功能,于是便写了一个闹钟功能,有兴趣的朋友可以看看,原创 2011-08-24 15:11:24 · 148 阅读 · 0 评论 -
iPhone 视频播放
theMovie = [[MPMoviePlayerController alloc] init]; theMovie.view.backgroundColor = [UIColor blackColor]; theMovie.view.frame = [AppUIViewController getInstance].view.bounds; UILabel *label = ...原创 2011-08-24 15:11:04 · 119 阅读 · 0 评论 -
iPhone 数据持久储存的几种方式
1 ,用存文件的方式实现持久存储2 ,NSUserDefault 简单数据存储3 ,数据库存取 //// TestBedViewController.m// Core_DataTest//// Created by mir on 11-3-31.// Copyright 2011 __MyCompanyName__. All rights res...原创 2011-08-24 15:07:15 · 157 阅读 · 0 评论 -
iPhone plist中常用属性值设置
info.plist中 Icon already includes gloss effects 设置icon的高亮是否需要icon file 图标Bundle version 版本信息Bundle display name 应用名称 //更新的---------------------------------CFBundleDisplayName 包的显...原创 2011-08-24 15:03:59 · 140 阅读 · 0 评论 -
iPhone线程的使用
//线程的创建方式[NSThread detachNewThreadSelector:@selector(getUserInfo:) toTarget:self withObject:xxx]; - (void)getUserInfo:(NSString *)uid { NSAutoreleasepool *pool = [[NSAutoreleasepoo...原创 2011-08-24 14:48:25 · 125 阅读 · 0 评论 -
iPhone 带下滑线的文字并可触发事件
"一般一个控件元素有下划线并有点击事件的话就应该是一个hyperlinkbutton1) 用button来实现是最简单的,只需为button设置含下划线的string即可2) label除了要设置string之外还要加点击事件" 以下是修改字体的代码: - (void) updateButtonTitle{@try {NSString* titleS...原创 2011-08-24 14:43:30 · 161 阅读 · 0 评论 -
iPhone 淡入淡出动画
//// TestBedViewControl_002.m// UIViewAnimationsTest//// Created by mir on 11-4-1.// Copyright 2011 __MyCompanyName__. All rights reserved.// #import "TestBedViewControler_0...原创 2011-08-24 15:27:54 · 174 阅读 · 0 评论 -
iPhone 翻转动画
//// TestBedViewControler_003.m// UIViewAnimationsTest//// Created by mir on 11-4-1.// Copyright 2011 __MyCompanyName__. All rights reserved.// #import "TestBedViewControler...原创 2011-08-24 15:28:55 · 106 阅读 · 0 评论 -
交叉淡化、新视图移动到旧视图上,新视图推出就视图,旧视图移开显示新的...
//// TestBedViewControler_004.m// UIViewAnimationsTest//// Created by mir on 11-4-1.// Copyright 2011 __MyCompanyName__. All rights reserved.// #import "TestBedViewControler...原创 2011-08-24 15:30:45 · 105 阅读 · 0 评论
分享