ITeye博客

龙泉android,ios无线技术博客

修博龙泉 · 共 123 篇文章

ios 修改工程名

3.2版本的话可以直接在Xcode的Project下面的Rename修改,而其他的以前版本使用: 1、直接修改info里面的Bundle display name,这个方法只是修改了在模拟器上显示的icon下面的app文字,其他的象Products下面的xx.app,Targets下面的xx,Executables下面的xx等都没有修改。 2、如果要修改products下面的xx.app的名字,就需要修改Project->Edit active target->Build->Product Name。 3、如果要修改targets、executables下面的名字,就修改Project->E…

2012-12-12 20:30 · ios开发学习相关 · 评论(0)

iOS SEL类型iOS SEL类型

bjective-C在编译的时候,会根据方法的名字(包括参数序列),生成一个用 来区分这个方法的唯一的一个ID,这个ID就是SEL类型的。我们需要注意的是,只要方法的名字(包括参数序列)相同,那么它们的ID都是相同的。就是 说,不管是超类还是子类,不管是有没有超类和子类的关系,只要名字相同那么ID就是一样的。 我们可以方便的通过方法的名字,获取到方法的ID也就是我们所说的SEL,反之亦然。具体的使用方法如下: 1 SEL 变量名 = @selector(方法名字); 2 SEL 变量名 = NSSelectorFromString(方法名字的字符串); 3 NSString *变量名 = N…

2012-12-11 10:50 · ios开发学习相关 · 评论(0)

长按地图获取经纬度 添加图钉

长按地图获取经纬度 UILongPressGestureRecognizer *lpress = [[uilongpressgesturerecognizer alloc] initWithTarget:self action:@selector(longPress:)]; lpress.minimumPressDuration = 0.3;//按0.5秒响应longPress方法 lpress.allowableMovement = 10.0; //给MKMapView加上长按事件 [mapview addgesturerecognizer:lpress];//mapView是MKMapV…

2012-12-07 17:09 · ios开发学习相关 · 评论(0)

ios 手势识别

转自http://blog.csdn.net/likendsl/article/details/7554150 一、概述 iPhone中处理触摸屏的操作,在3.2之前是主要使用的是由UIResponder而来的如下4种方式: (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *…

2012-12-05 13:36 · ios开发学习相关 · 评论(0)

MKMapView 显示当前位置

//显示地图 MKMapView *mapView = [[mkmapview alloc]initWithFrame:CGRectMake(0, 0, 320, 480)]; mapView.showsUserLocation = YES; [self.view addsubview:mapview]; //显示当前用户经纬度,自动缩放到1000米 CLLocationManager *locationManager = [[cllocationmanager alloc] init];//创建位置管理器 locationManager.delegate=self;//设置代理 locat…

2012-12-03 17:14 · ios开发学习相关 · 评论(0)

imageView setImageWithURL

success:^(UIImage *image, BOOL cached) { } failure:nil];

2012-11-30 23:24 · ios开发学习相关 · 评论(0)

uiimageview 自适应

detailImageView.contentMode = UIViewContentModeScaleAspectFit;

2012-11-30 13:00 · ios开发学习相关 · 评论(0)

status bar 半透明

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initwithnibname:nibnameornil bundle:nibbundleornil]; if (self) { // Custom initialization self.wantsFullScreenLayout = YES; } return self; } [[uiapplication sharedapplication] setStatusBarHidden:hideEna…

2012-11-28 10:42 · 评论(0)

statusbar 隐藏

方法1: [[uiapplication sharedapplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone]; 方法2: UIView *proxyView = [[uiview alloc] initWithFrame:self.view.frame]; proxyView.hidden=YES; proxyView.autoresizingMask= self.view.autoresizingMask; [self.view.superview addsubview:proxyview]; […

2012-11-27 11:30 · ios开发学习相关 · 评论(0)

uitableview cell 数据重复

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier]; if (cell == nil) { cell = [[[uitableviewcell alloc] initWithStyle:UITabl…

2012-11-26 10:58 · ios开发学习相关 · 评论(0)

uitableview 取消选择颜色

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { //取消选中颜色 UIView *backView = [[uiview alloc] initWithFrame:cell.frame]; cell.selectedBackgroundView = backView; cell.selectedBackgroundView.backgroundColor = [uicolor clearcolor]; //取消边框线 [cell s…

2012-11-21 20:11 · ios开发学习相关 · 评论(0)

uitable 循环输出

for(int j=0;j<24;j++){ [headerarray addobjectsfromarray:aticket.result]; } //[headerarray addobjectsfromarray:aticket.result]; //[headerscrollview setframe:cgrectmake(0, 0, 320, 30+75*([headerarray count]/4))]; NSLog(@"%d",200+30+75*([headerarray count]/4)); [headerscrollview setbackgroundcolor:[ui…

2012-11-14 14:16 · 评论(0)

UIImageView 设置圆角

#import <QuartzCore/QuartzCore.h> CALayer *l = [uiimageview layer]; [l setmaskstobounds:yes]; [l setcornerradius:6.0]; [headerscrollview addsubview:headerimage];

2012-11-12 14:43 · ios开发学习相关 · 评论(0)

展示图片动画

//创建一个UIimageView UIImageView *gifImage = [[uiimageview alloc] initWithFrame:CGRectMake(100,100,56,56)]; NSMutableArray *images = [nsmutablearray array]; for (int i = 1; i <= 5; i ++)//该组共16张图片 { //将要播放的图片加入数组 [images addobject:[uiimage imagenamed:[nsstring stringwithformat:@"menu_0%i", i]]]; } gif…

2012-10-30 10:24 · ios开发学习相关 · 评论(0)

ios 展示gif动画

#import "SCGIFImageView.h" NSString* filePath = [[nsbundle mainbundle] pathForResource:@"1.gif" ofType:nil]; SCGIFImageView* gifImageView = [[[scgifimageview alloc] initWithGIFFile:filePath] autorelease]; gifImageView.frame = CGRectMake(0, 0, gifImageView.image.size.width, gifImageView.image.size.h…

2012-10-30 10:24 · ios开发学习相关 · 评论(0)