自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

iphone专栏

记录一些学习的过程

  • 博客(26)
  • 收藏
  • 关注

原创 UIScrollerView和UIPageView联合使用

ViewController.h#import @interface FourthViewController : UIViewController{ CGFloat screenWidth; NSArray *AdImgArray; int TimeNum; BOOL Tend;}@property (strong, nonatomic) IB

2013-04-18 15:09:55 1208

原创 ios截取网址host

NSString *webSiteString = @"http://www.baidu.com/wa/asfafaf"; //截取host NSString*str_intercepted = [webSiteString substringFromIndex:7]; NSString*str_character = @"/"; NSRange rang

2013-01-30 13:19:09 933

原创 ios中域名转换为ip地址

#include #include - (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. NSString *webSiteString = @"www.baidu.com"; //NS

2013-01-29 16:06:38 1420

转载 基于四元素法的捷联惯导姿态更新算法

摘要         本文主要介绍了机载捷联惯导系统常用的姿态更新算法——四元素法,并重点介绍了利用四元素法进行姿态更新的一般过程。       关键词:四元素法,连贯导,姿态1 引言       所谓姿态更新是指将运载体上惯性单元的输出,实时转换成运载体的姿态。这里的姿态通常指机体坐标系(b系)相对于导航坐标系(n系)的角位置。       对于一个姿态求解系统而

2012-09-05 10:38:04 8957 3

原创 iOS 截图

+ (UIImage *)viewToImage:(UIView *)theView{ UIGraphicsBeginImageContext(theView.frame.size); CGContextRef context = UIGraphicsGetCurrentContext(); [theView.layer renderInContext:context]

2013-07-19 16:03:37 636

原创 NStimer延时

NSDate *localeDate = [NSDatedate];                NSTimeInterval timeInterval = [localeDatetimeIntervalSince1970] + 10; //10s        NSDate *date = [NSDatedateWithTimeIntervalSince1970

2013-07-16 20:52:38 488

原创 AFNetWorking 的使用方法

httpNSURL *url = [NSURL URLWithString:@"https://alpha-api.app.net/stream/0/posts/stream/global"];NSURLRequest *request = [NSURLRequest requestWithURL:url];AFJSONRequestOperation *operation = [AFJS

2013-07-05 10:23:43 1284

原创 自定义导航栏的返回键

UIImage *backButtonHomeImage = [[UIImage imageNamed:@"nav_back"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 30, 0, 0)]; [[UIBarButtonItem appearance] setBackButtonBackgroundImage:backBut

2013-06-04 14:58:23 970

原创 使用AsiHttp 提交 json数据

NSString *myLicense = @"901104470713276";//[[NSUserDefaults standardUserDefaults] objectForKey:MY_LICENSE]; NSString *api = [APITools getAPIAddressFor:APIMethodFirstViewDate]; NSDict

2013-05-16 11:03:58 550

原创 自定义Navigation

//AppDelegate.m中设置背景图片self.rootNavigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; [self.rootNavigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"Nav

2013-05-14 13:04:27 957

原创 使用RGB设置UIColor

#define RGBA(r, g, b, a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((fl

2013-05-10 10:57:52 1097

原创 自定义UIview关联xib

1. 首先使用interface builder 新建一个uiview的.xib文件。2. 向新建的uiview的.xib文件添加需要的控件。3. 定义一个继承自uiview的派生类,将对应的view的custom class 设为你自定义的view类。4,file's ower 对应的custom class 为UIView5. 将在xib文件上添加的控件与继

2013-04-27 09:40:05 2462

原创 xcode git版本管理

删除版本管理:cd 目录find . -type d -name ".svn"|xargs rm -rforrm -fr .git创建版本库:cd 目录git initgit add .git commit -m 'Initial commit'

2013-04-12 11:20:53 518

原创 DNStoIP

#import "ViewController.h"#include #include @interface ViewController ()@end@implementation ViewController- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loa

2013-02-18 17:23:28 373

原创 判断ios系统版本

#define IOS_VERSION [[[UIDevice currentDevice] systemVersion] floatValue] if(IOS_VERSION >= 4.3){ .............}else{ .............}

2013-02-18 13:37:56 498

转载 ios中navigation相关的视图切换

1.NavigationController切换UIViewController的两种方式方法一右侧进入1 SecondViewController* svc=[[SecondViewController alloc]init];2 [self.navigationController pushViewController:fvc animated:YES];返回到上一个[se

2013-02-04 17:03:34 1536

转载 iOS应用程序生命周期(前后台切换,应用的各种状态)详解

原文地址:http://blog.csdn.net/totogo2010/article/details/8048652  iOS的应用程序的生命周期,还有程序是运行在前台还是后台,应用程序各个状态的变换,这些对于开发者来说都是很重要的。 iOS系统的资源是有限的,应用程序在前台和在后台的状态是不一样的。在后台时,程序会受到系统的很多限制,这样可以提高电池的使用和用户体验。

2013-02-04 13:49:15 312

原创 UIWebView的基本使用

- (void)embedInternalVideo:(CGRect)frame { NSBundle *bundle = [NSBundle mainBundle]; NSString* html = @""; if (videoView == nil) { videoView = [[UIWebView alloc] initWithFrame:fr

2013-01-29 12:38:12 302

原创 使用ASIHTTPRequest异步提交数据

- (void)viewDidLoad{ [super viewDidLoad]; //构造json NSDictionary * params = [[NSDictionary alloc] initWithObjectsAndKeys: device_id, @"device_id", device, @"device", license

2013-01-28 10:25:03 667

转载 iPhone应用程序中App目录结构

了解iPhone应用程序中App目录结构首先我们知道iPhone的App的目录结构如下: 对于一个运行在iPhone的App,它只能访问自己根目录下的一些文件(即所谓沙盒sandbox保护机制)。一个app发布到iPhone上后,它的目录结构如下:其中的app root根目录可以用NSHomeDirectory()访问到;Documents目录就是我

2013-01-21 13:34:24 2509

原创 MPMoviePlayerController的使用

格式支持:MOV、MP4、M4V、与3GP等格式,还支持多种音频格式。首先引入 MediaPlayer.framework然后#import 一、创建MPMoviePlayerController 类通过一个NSURL来初始化(本地的,也可以是远程的)。初始化需要通过 initWithContentURL 方法来实现:MPMoviePla

2013-01-21 09:41:57 707

原创 委托代理(degegate)的理解和使用示例

什么是代理,如何实现的?委托代理(degegate),顾名思义,把某个对象要做的事情委托给别的对象去做。那么别的对象就是这个对象的代理,代替它来打理要做的事。反映到程序中, 首先要明确一个对象的委托方是哪个对象,委托所做的内容是什么。委托者:SecondPageControl.h#import //委托的声明,设置委托者的名称 =1=@prot

2012-09-06 12:18:55 687

原创 响应按钮的事件

怎样响应按钮的事件: imageView.userInteractionEnabled = YES; //允许图片的点击事件如何处理点击: UIButton *btn; btn = [UIButton buttonWithType:UIButtonTypeCustom]; //button风格 btn.tag = 111; //按钮标签 bt

2012-09-06 12:15:12 610

原创 纯代码写Navigation Bar

//创建一个导航栏UINavigationBar *navigationBar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];如果只需要简单的设置标题:self.navigationItem.title = @"标题";=============================

2012-09-06 10:40:04 4607

转载 UITableView 应用及其总结

UITableView 的Style 预设有两种:Plain 及Grouped。Plain:Grouped:(ps:多了个外边框)装在UITableView 里面的元素是UITableViewCell。Cell的结构图:而UITableViewCell 预设有4种样式Style:UITableVie

2012-09-05 10:26:10 1056

原创 纯代码定义一个标准的tabBar

AppDelegate.h 头文件#import @interface AppDelegate : UIResponder { UITabBarController * tabBar;}@property(nonatomic,retain)UITabBarController * tabBar;@property (strong, nonatomic) UIW

2012-09-05 09:10:11 769

空空如也

空空如也

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

TA关注的人

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