龙泉android,ios无线技术博客
修博龙泉 · 共 123 篇文章
ios 拍照旋转90度
- (UIImage*)rotateImage:(UIImage *)image { int kMaxResolution = 960; // Or whatever CGImageRef imgRef = image.CGImage; CGFloat width = CGImageGetWidth(imgRef); CGFloat height = CGImageGetHeight(imgRef); CGAffineTransform transform = CGAffineTransformIdentity; CGRect bounds = CGRectMake(0, 0, width,…
2012-09-28 10:22 · ios开发学习相关 · 评论(0)
ios 页面跳转
UINavigationController *nav = [[[uinavigationcontroller alloc] initWithRootViewController:hotAlbum] autorelease]; nav.navigationBarHidden = YES; [self presentmodalviewcontroller:nav animated:yes];
2012-09-27 15:26 · ios开发学习相关 · 评论(0)
图片旋转90度
refreshArrowImageView.transform = CGAffineTransformMakeRotation(3.14);
2012-09-27 14:11 · ios开发学习相关 · 评论(0)
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-fi。设置这一个属性可以防止这种情况的发生,并且保持连接处于活动状态 Bundle display name 这用于设置应用程序的名称,它显示在iphone屏幕的图标下方。应用程序名称限制在10-12个字符,…
2012-09-27 11:58 · ios开发学习相关 · 评论(0)
ios 风火轮设置
#import "MBProgressHUD.h" @interface UploadDesViewController : UIViewController<MBProgressHUDDelegate>{ MBProgressHUD *HUD; } @property (retain, nonatomic) MBProgressHUD *HUD; .m @synthesize HUD; self.HUD = [[[mbprogresshud alloc] initWithView:self.view] autorelease]; [self.view addsubview:hud]; HU…
2012-09-27 10:59 · ios开发学习相关 · 评论(0)
UILabel的各种属性与方法的使用(转)
#import "LabelTestViewController.h" @implementation LabelTestViewController /* Accessing the Text Attributes text property font property textColor property textAlignment property lineBreakMode property enabled property Sizing the Label’s Text adjustsFontSizeToFitWidth property baselineAdjustment pr…
2012-09-26 14:31 · ios开发学习相关 · 评论(0)
UISwitch 初始化
1.UISwitch的初始化 UISwitch *switchView = [[uiswitch alloc] initWithFrame:CGRectMake(54.0f, 16.0f, 100.0f, 28.0f)]; 2.设置UISwitch的初始化状态 switchView.on = YES;//设置初始为ON的一边 3.UISwitch事件的响应 [switchview addtarget:self action:@selector(switchaction:) forcontrolevents:uicontroleventvaluechanged]; 在cell中添加uiswit…
2012-09-25 18:54 · ios开发学习相关 · 评论(0)
ios 字体设置
-(void)viewDidAppear:(BOOL)animated{ [walltitle settext:@"图片墙"]; [walltitle setfont:[uifont fontwithname:@"stheititc-medium" size:23.5f]]; [self.view addsubview:walltitle]; } UIColor *color = [uicolor colorwithred:88.0f/255.0f green:145.0f/255.0f blue:175.0f/255.0f alpha:1.0f]; 最新做的一个项目,要求字体为MVBoli…
2012-09-25 11:43 · ios开发学习相关 · 评论(0)
OC 字符串合并
NSString* result; // 结果字符串 NSString* string1, string2; //已存在的字符串 1. result = [nsstring initwithformat:@"%@,%@", string1, string2 ]; 2. result = [string1 stringbyappendingstring:string2]; 3 . result = [result stringbyappendingformat:@"%@,%@",string1, string2];
2012-09-25 10:33 · ios开发学习相关 · 评论(0)
uibutton 对象传递
UIButton *btn = (UIButton *)[cell viewwithtag:101]; btn.frame = CGRectMake(5, 5, 150, hei - 10); [btn addtarget:self action:@selector(selectpic:) forcontrolevents:uicontroleventtouchupinside]; if ([indexpath section]==0) { picture = [guangpicleftarray objectatindex:[indexpath row]]; }else{ picture …
2012-09-24 15:49 · ios开发学习相关 · 评论(0)
uiscrollView 添加图片 滑动
headerImageScrollView = [[uiscrollview alloc]initWithFrame:CGRectMake(0,0, 320, 260)]; scrollView.contentSize = CGSizeMake(900, 960); [self.view addsubview:scrollview]; // image = [[uiimageview alloc]initWithFrame:CGRectMake(5, 5, 80, 80)]; // [image setimage:[uiimage imagenamed:@"0.jpg"]]; // [sel…
2012-09-24 11:18 · ios开发学习相关 · 评论(0)
uitableview cell 自定义高度
#pragma mark – #pragma mark UITableView -(CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 100*[indexpath row]; }
2012-09-23 16:34 · ios开发学习相关 · 评论(0)
UIImageView 初始化
UIImageView *imageView = [[uiimageview alloc] initWithFrame:CGRectMake(0,0,320,640)]; [imageview setbackgroundcolor:[uicolor redcolor]]; [imageview setimage:[uiimage imagenamed:@"0.jpg"]]; // imageView.image = [uiimage imagenamed:@"0.jpg"];//加载入图片 [self.view addsubview:imageview]; [imageview releas…
2012-09-23 16:16 · ios开发学习相关 · 评论(0)