自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(123)
  • 收藏
  • 关注

原创 uitableview 取消选择颜色

[code="java"]- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{  //取消选中颜色  UIView *backView = [[UIView alloc] initWithFrame:cell.frame]...

2012-11-21 20:11:23 119

原创 uitable 循环输出

[code="java"]for(int j=0;j

2012-11-14 14:16:00 148

原创 UIImageView 设置圆角

[code="java"]#import CALayer *l = [uiimageview layer]; [l setMasksToBounds:YES]; [l setCornerRadius:6.0]; [headerScrollView addSubview:headerImage];[/code]

2012-11-12 14:43:43 136

原创 展示图片动画

[code="java"] //创建一个UIimageView UIImageView *gifImage = [[UIImageView alloc] initWithFrame:CGRectMake(100,100,56,56)]; NSMutableArray *images = [NSMutableArray arra...

2012-10-30 10:24:38 95

原创 ios 展示gif动画

[code="java"]#import "SCGIFImageView.h" NSString* filePath = [[NSBundle mainBundle] pathForResource:@"1.gif" ofType:nil]; SCGIFImageView* gifImageView = [[[SCGIFImageView alloc] initWithGIFFi...

2012-10-30 10:24:02 167

原创 object-c 获得时间/时间戳 格式化时间

[code="java"]/** 格式化时间 timeSeconds 为0时表示当前时间,可以传入你定义的时间戳 timeFormatStr为空返回当当时间戳,不为空返回你写的时间格式(yyyy-MM-dd HH:ii:ss) setTimeZome ([NSTimeZone systemTimeZone]获得当前时区字符串) */-(NSString *)setTim...

2012-10-29 10:09:45 1004

原创 NSNotificationCenter 例子

.h[code="java"] [[NSNotificationCenter defaultCenter] postNotificationName:@"wantuNewMessage" object:@"10"];[/code].m[code="java"]- (void...

2012-10-26 13:56:37 99

原创 ios自定义BadgeValue

[code="java"]//// ViewController.m// Badge//// Created by Bo Xiu on 12-10-23.// Copyright (c) 2012年 Bo Xiu. All rights reserved.//#import "ViewController.h"#import "JSBadgeView...

2012-10-23 16:14:01 174

原创 自定义uitarbarItem

-(void)viewDidAppear:(BOOL)animated{ [self showBadgeValue:@"10"];}- (void)showBadgeValue:(NSString *)strBadgeValue{ UITabBar *tabBar = [[UITabBar alloc] initWithFrame:CGRectMak...

2012-10-23 15:36:13 147

原创 plist存放数组

plist使用的若干问题弄了半天的plist,最无语的莫过于plist还分种类的。有字典型和数组型等。plist的写入是,你把你放在工程中的plist删掉。你要写入plist的时候,如果发现没有该plist,其会帮新建该plist。别傻傻的认为自己建立一个plist,然后运行程序的时候他会在你建的那plist里面多出几行数据,因为你修改的是应用中的plist而非你本地的那个...

2012-10-23 11:01:33 280

原创 ios中NSUserDefault的使用

NSUserDefaults的使用创建一个user defaults方法有多个,最简单得快速创建方法: NSUserDefaults *accountDefaults = [NSUserDefaults standardUserDefaults];添加数据到 user defaults: [accountDefaults setObject:nameField.te...

2012-10-22 15:24:17 152

原创 NSTimer

NSTimer *timer = [[[NSTimer alloc]init]autorelease]; timer = [NSTimer scheduledTimerWithTimeInterval:3.0 target:self selector:@selector(function:) userInfo:nil repeats:YES];

2012-10-22 14:06:30 78

原创 ios: APNS 配置

AppDelegate.m[code="java"]- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[[UIWindow alloc] initWithFrame:[[UISc...

2012-10-22 11:11:23 337

原创 ios: apns 消息推送

openssl pkcs12 -clcerts -nokeys -out cert.pem -in aps_development.p12 openssl pkcs12 -nocerts -out key.pem -in aps_development.p12 openssl rsa -in key.pem -out key.unencrypted.pem cat cert...

2012-10-19 16:51:32 99

原创 ios推送:本地通知UILocalNotification

https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/IPhoneOSClientImp/IPhoneOSClientImp.htmlappdelegate.m[code="java"]- (BOOL)application...

2012-10-19 15:05:59 83

原创 [IOS]NSTimer启动与停止 (2012-02-03 14:49:06)转载

[IOS]NSTimer启动与停止 (2012-02-03 14:49:06)转载▼标签: 杂谈 分类: Codetimer = [NSTimer scheduledTimerWithTimeInterval:3.0 target:self selector:@selector(function:) userInfo:nil repeats:NO];timer运行一次就会自动停下...

2012-10-18 14:21:38 97

原创 ios 获取所有通讯录

[code="java"]#import #import -(void)viewDidAppear:(BOOL)animated{ ABAddressBookRef addressBook = ABAddressBookCreate(); CFArrayRef results = ABAddressBookCopyArrayOfAllPeople(a...

2012-10-18 11:09:58 108

原创 uitableview 上提下拉刷新

[code="java"]#import #import "PullToRefreshTableView.h"@interface ChyoViewController : UIViewController { PullToRefreshTableView * tableView; NSMutableArray * array; /...

2012-10-17 14:34:37 144

原创 uitableview 上下滚动

table = [[PullToRefreshTableView alloc] initWithFrame:CGRectMake(0, 45, 320, 480)]; [table setContentSize:CGSizeMake(320, 960)]; //table.contentSize = CGRectMake(0, 0, 320, 960); ta...

2012-10-17 14:32:54 150

原创 mac 开启php服务

1:系统工具-》共享-》开启个人文件夹2: cp /etc/php.ini.default /etc/php.ini3: sudo vi /etc/apache2/httpd.conf xxxlibphpxxx 前面#注释掉,开启apache 中的php服务4:suod apachectl restart5: 在网站文件夹下建立.php 配置结束...

2012-10-10 11:42:27 134

原创 ios 拍照旋转90度

[code="java"]- (UIImage*)rotateImage:(UIImage *)image{ int kMaxResolution = 960; // Or whatever CGImageRef imgRef = image.CGImage; CGFloat width = CGImageGetWidth(imgRef);...

2012-09-28 10:22:45 164

原创 ios 页面跳转

[code="java"]UINavigationController *nav = [[[UINavigationController alloc] initWithRootViewController:hotAlbum] autorelease]; nav.navigationBarHidden = YES; [self ...

2012-09-27 15:26:49 100

原创 图片旋转90度

refreshArrowImageView.transform = CGAffineTransformMakeRotation(3.14);

2012-09-27 14:11:16 128

原创 iphone 常用的<app>-info.plist设置

Application requires iPhone environment如果应用程序不能在ipod touch上运行,设置此项为true;Application uses Wi-Fi如果应用程序需要wi-fi才能工作,应该将此属性设置为true。这么做会提示用户,如果没有打开wi-fi的话,打开wi-fi。为了节省电力,iphone会在30分钟后自动关闭应用程序中的任何wi-...

2012-09-27 11:58:44 157

原创 ios 页面延迟

[self performSelector:@selector(descBack) withObject:nil afterDelay:2]; // [self dismissModalViewControllerAnimated:YES];[self performSelector:@selector(hidenSelf) withObject:nil afterDe...

2012-09-27 11:16:03 104

原创 ios 风火轮设置

[code="java"]#import "MBProgressHUD.h"@interface UploadDesViewController : UIViewController{ MBProgressHUD *HUD; }@property (retain, nonatomic) MBProgressHUD *HUD;[/code].m@synthesize H...

2012-09-27 10:59:31 148

原创 UILabel的各种属性与方法的使用(转)

#import "LabelTestViewController.h" @implementation LabelTestViewController /* Accessing the Text Attributes text property font property textColor property ...

2012-09-26 14:31:01 74

原创 UISwitch 初始化

[code="java"]1.UISwitch的初始化UISwitch *switchView = [[UISwitch alloc] initWithFrame:CGRectMake(54.0f, 16.0f, 100.0f, 28.0f)];2.设置UISwitch的初始化状态switchView.on = YES;//设置初始为ON的一边 3.UISwitch事件的响应[...

2012-09-25 18:54:30 182

原创 uitableview 添加uiview

[cell.contentView addSubView:subView];

2012-09-25 18:52:41 256

原创 ios 字体设置

[code="java"]-(void)viewDidAppear:(BOOL)animated{ [wallTitle setText:@"图片墙"]; [wallTitle setFont:[UIFont fontWithName:@"STHeitiTC-Medium" size:23.5f]]; [self.view addSubview:wallTitle...

2012-09-25 11:43:24 100

原创 OC 字符串合并

[code="java"]NSString* result; // 结果字符串NSString* string1, string2; //已存在的字符串1. result = [NSString initWithFormat:@"%@,%@", string1, string2 ];2. result = [string1 stringByAppendingString:strin...

2012-09-25 10:33:31 295

原创 uibutton 对象传递

[code="java"]UIButton *btn = (UIButton *)[cell viewWithTag:101]; btn.frame = CGRectMake(5, 5, 150, hei - 10); [btn addTarget:self action:@selector(selectPic:) forControlEvents:UIControlEve...

2012-09-24 15:49:16 131

原创 uiscrollView 添加图片 滑动

[code="java"] headerImageScrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0,0, 320, 260)]; scrollView.contentSize = CGSizeMake(900, 960); [self.view addSubview:scrollView];// ...

2012-09-24 11:18:50 189

原创 uitableview cell 自定义高度

[code="java"]#pragma mark –#pragma mark UITableView-(CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ return 100*[indexPath row];}[/code]...

2012-09-23 16:34:39 110

原创 UIImageView 初始化

[code="java"] UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,640)]; [imageView setBackgroundColor:[UIColor redColor]]; [imageView setImage:[UIImage imag...

2012-09-23 16:16:14 154

原创 uitableview 初始化

#pragma mark - TableView Methods//指定有多少个分区(Section),默认为1- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1;}//指定每个分区中有多少行,默认为1- (NSInteger)tableView:(UITable...

2012-09-21 18:50:57 173

原创 ios 获取所有字体列表

[code="java"]NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]]; NSArray *fontNames; NSInteger indFamily, indFont; for (indFamily=0; indFamily

2012-09-21 13:20:37 280

原创 自定义 UISegmentControl

//// CustomSegmentedViewController.m// CustomSegmented//// Created by qian cheng on 12-1-12.// Copyright 2012 __MyCompanyName__. All rights reserved.//#import "CustomSegmentedViewC...

2012-09-20 14:53:31 153

原创 消息数量展示

tabbarItem 消息提示 self.tabBarItem.badgeValue=@"100"; [[UIApplication sharedApplication] setApplicationIconBadgeNumber:5];

2012-09-19 19:19:32 115

原创 tabBarController 自定义高度

self.tabBarController = [[[UITabBarController alloc] init] autorelease]; //自定义tabBarController高度 self.tabBarController.tabBar.frame = CGRectMake(0, self.window.frame.size.height-44...

2012-09-19 19:02:33 210

空空如也

空空如也

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

TA关注的人

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