自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(64)
  • 资源 (4)
  • 收藏
  • 关注

原创 ios自定义framework

ios自定义framework,生成framework后,真机调用dyld: Library not loaded:这个问题其实时我们在生成自己的framework时默认的生成方式时动态的,这样就有了可变性,真机上是找不到这个framework的,因此我们只需要修改生成方式为静态的就可以了。 具体步骤build settings  查找 mach修改Mach-o type...

2015-07-14 16:33:35 125

iOS http封装

程序开发避免不了与服务器的交互,这里打包了一个自己写的http交互库。希望可以帮到大家。 内置一个basehttp,当我们创建自己的service可以继承实现。 KuroAppBaseHttp *baseHttp = [[KuroAppBaseHttp alloc] init];[baseHttp setDelegate:self];[baseHttp loadHttp:...

2015-07-14 16:26:11 159

ios内付费

近年来写了很多IOS的程序,内付费也用到不少,使用IOS的内付费实现起来比较麻烦,这里我写了一个简单的内付费包,希望对大家有帮助。 具体使用如下:这里的sender其实就是调用者,这里主要是为了回调使用。[KuroStoreApi kuroStoreProductId:@"产品ID" storeSender:self storeFinishCallBackBlock:^(Kur...

2015-07-14 16:15:59 123

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 156

CCDataVisitor.h, #include <string> 'string' file not found

CCDataVisitor.h, #include &lt;string&gt; 'string' file not found 这个错误因为你的.m文件引用里.mm的文件,这里需要把.m改成.mm就可以了。

2015-03-26 15:55:47 999

原创 his device is no longer connected.

his device is no longer connected. 拔掉数据线,重启Xcode,再次连接数据线,OK

2015-01-15 15:09:03 340

原创 iOS绘制颜色渐变

- (UIColor *)getUIImageToColor:(float)h withWidth:(float)w{   float TITLE_CONTROL_HEIGHT = h;   float TITLE_CONTROL_WIDTH = w;   /*     CGCradientCreateWithColorComponents函数需要四个参数:

2014-06-23 10:27:02 614

原创 idfa检查

 cd到工程目录下然后执行下面的命令grep -r advertisingIdentifier .  

2014-05-07 15:29:53 105

原创 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 157

原创 iOS 富文本控件

 使用方式:NSString *t = [NSStringstringWithFormat:@"&lt;a href=http://www.baidu.com &gt;&lt;font size = 22 color=#001100&gt;百度 &lt;/font&gt;&lt;/a&gt;"];     RTLabelComponentsStructure *component...

2014-04-25 15:24:27 72

原创 两个动画效果

// 心跳动画+ (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 99

原创 获取某一个class的私有Api

//知道怎么用私有api,要怎么获得        //要导入#import &lt;objc/runtime.h&gt;        NSString *className = NSStringFromClass([UIView class]);        //这里是uiview,可以改成自己想要的                const char *cClassN...

2014-04-25 15:17:28 99

iOS 画出不规则图形

以下为大家提供一种绘制不规则图形的方法,实现原理利用图像的遮盖。 //// 这种是路径遮盖法+ (UIImage*)maskImage:(UIImage*)originImage toPath:(UIBezierPath*)path{    UIGraphicsBeginImageContextWithOptions(originImage.size, NO, 0);  ...

2013-12-13 11:44:59 659

原创 关于IOS App唯一标示

大家都知道苹果对于唯一标示管理做了多次调整,之前ios6未发布前我们都是使用udid来统计,后来ios6出现了,udid这个接口被苹果无情的封杀。但是这样难不倒程序员们,我们立刻想到了,使用mac地址+自己设定的key 做出md5,这样我们就可以了。但是ios7发布后,苹果又一次无情的对此进行了封杀。  那么我们怎么办了,这个问题必须解决啊,后来经过耐心查看api,发现我们可以使用ke...

2013-11-13 17:18:23 153

关于IOS,UIViewController屏幕旋转

关于ios上面旋转的问题,ios6以下我们大家都知道,- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfacOrientation这个函数在旋转的时候会进行调用,并且我们还可以手动设置屏幕方向:[UIApplicationsharedApplication].statusBarOr...

2013-07-23 15:30:17 361

获取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 89

原创 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 61

原创 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 197

原创 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 87

CALayer 缩放动画

//放大        CAKeyframeAnimation* animation = [CAKeyframeAnimation animationWithKeyPath:@"transform"];        NSMutableArray *values = [NSMutableArray array];        [values addObject:[NSValue...

2012-05-03 15:31:40 283

CALayer 按指定的点 运动

CGMutablePathRef thePath = CGPathCreateMutable();         CGPathMoveToPoint(thePath,NULL,aLayer.position.x, aLayer.position.y - 10);        CGPathAddCurveToPoint(thePath,NULL,              ...

2012-05-03 15:30:16 75

目前最好用的IOS网易微博SDK

网易微博上的SDK看上去不太明了,小弟这里对其进行了简单的封装,让大家在使用的时候只需要调用 loin登录 或者 send发送微博即可,好东西共分享.

2012-04-09 15:36:13 67

原创 iPhone开发常见的错误

  开始iPhone的Practise Project,其中有很多的问题,先记录起来,以免以后再犯:       1.  EXC_BAD_ACCESS:      发生场景1:一个指针转了两次,release了两次,其实只要release一次就可以。或者用指针时避免到处赋值。      发生场景2:在一个View Controller A里动态加载另外一个View Contro...

2012-02-06 16:51:41 74

自定义 UIActivityIndicatorView

 //view 沿中心点旋转  -1逆向旋转 1正向旋转        int direction = -1;        CABasicAnimation* rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];        rotationAnimation....

2012-02-02 13:42:55 94

原创 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 61

原创 iphone播放本地视频

- (void)playPreviewVideo { [UIApplication sharedApplication].statusBarHidden = YES; NSString *urlStr = [[NSBundle mainBundle] pathForResource:@"app" ofType:@"mp4"]; NSURL *url = [NSUR...

2011-09-15 15:58:23 152

原创 iphone 封装自己的静态库

1.打开xcode 选择新建Library --- Cocoa touch static Library --- choose --- 命名2. 新建自己要编写的库文件3. 实现完成以后编译一下,让后你的库文件就可以使用了...

2011-09-02 17:40:51 82

UIViewController理解

关于UIViewContrller的理解: 1.UIViewContrller之间的切换有三种方式: 一、UIViewController自身之间的调用:([self presentModalViewController:UIViewController animated:YES];) 对应的返回操作函数:[self dismissModalViewControllerAnimate...

2011-08-30 11:53:39 82

原创 为模拟器添加图片和视频

添加照片:1)打开模拟器,并且确保位于iPhone桌面界面。2)从计算机桌面把任何图像拖动到iPhone模拟器上。Safari会在模拟器上打开图像并显示(如图2-47所示)。3)触摸并按住图像。将会弹出一个对话框,允许你把图像保存到Photos应用程序中。...

2011-08-29 17:33:38 211

原创 关与NSThread的退出

当View离开父窗口之前将Thread结束掉 这样就能有效的管理线程和逻辑处理了 - (void)login { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; thread = [NSThread currentThread]; sleep(3.0f); if (![thread isCance...

2011-08-29 09:06:27 159

原创 隐藏UIScrollView的滚动条

scrollView.showsVerticalScrollIndicator = FALSE;scrollView.showsHorizontalScrollIndicator = FALSE;

2011-08-25 11:43:08 227

原创 UITextView显示HTML内容,实现显示不同的字体和文字颜色

[textView setContentToHTMLString:txtStr]; &lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;img src = "http://t1.baidu.com/it/u=1075557596,3331641536&amp;fm=15&amp;gp=0.jpg"&g

2011-08-25 11:05:11 287

原创 iPhone NSLog输出格式

%@ Object%d, %i signed int%u unsigned int%f float/double%x, %X hexadecimal int%o octal int%zu size_t%p pointer%e float/double (in scientific notation)%g float/double (as %f or %e, ...

2011-08-24 15:57:54 130

原创 弹出动画

    ////  TestBedViewControler_006.m//  UIViewAnimationsTest////  Created by mir on 11-4-1.//  Copyright 2011 __MyCompanyName__. All rights reserved.// #import "TestBedViewControler...

2011-08-24 15:34:46 58

原创 翻页动画

    ////  TestBedViewControler_005.m//  UIViewAnimationsTest////  Created by mir on 11-4-1.//  Copyright 2011 __MyCompanyName__. All rights reserved.// #import "TestBedViewControler...

2011-08-24 15:33:36 66

原创 交叉淡化、新视图移动到旧视图上,新视图推出就视图,旧视图移开显示新的...

    ////  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 63

原创 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 57

原创 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 126

原创 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 291

原创 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 362

CoverFlow 例子

coverflow 代码,可直接使用,方便。

2011-09-16

windows下 qt eclipse 插件安装解析

内容详细的介绍了如何在windows下将qt插件安装到eclipse中..

2010-12-14

j2me 眼疾手快小游戏

眼疾手快小游戏 眼疾手快小游戏眼疾手快小游戏眼疾手快小游戏眼疾手快小游戏眼疾手快小游戏眼疾手快小游戏眼疾手快小游戏眼疾手快小游戏

2010-08-24

j2me 图片处理特效

该资源集成了 常用的一些动态特效,如 摇钱树,重力感应,播放mp3 的以及图片的一些处理等...

2010-08-24

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除