
IOS
文章平均质量分 63
清雨小竹
清明雨后 破土新竹
展开
-
在蒲公英获取IOS企业证书描述文件
在蒲公英获取IOS企业证书描述文件https://www.pgyer.com/app/getProvisionFileSafari 跳转至信任设备1.下载.mobileprovision文件放到服务器上2.Safari直接访问mobileprovision文件路径就可以了。...原创 2019-11-21 08:49:29 · 2078 阅读 · 2 评论 -
Touch
///获取touch位置 CGPoint touchPoint=[touch locationInView:self.view]; NSString *str=[NSString stringWithFormat:@"%f",touchPoint.x]; myLabel.text =str;// handle new touches- (void)touchesBegan:(NSSet原创 2012-12-06 15:30:00 · 831 阅读 · 0 评论 -
Alert
//////////响应 #pragma mark - UIActionSheetDelegate - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { // the user clicked one of the OK/Cancel buttons原创 2012-12-06 15:30:02 · 1091 阅读 · 0 评论 -
UIToolBar
// Do any additional setup after loading the view from its nib. UIBarButtonItem *one = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:nil action:nil]; U原创 2012-12-06 15:30:22 · 730 阅读 · 0 评论 -
NSTimer
[NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(timerFireMethod:) userInfo:nil repeats:YES];//使用timer定时,每秒触发一次,然后就是写selector了。 - (void)timerFireMethod:(NSTimer*)theTimer{}原创 2012-12-06 15:30:37 · 698 阅读 · 0 评论 -
ios 音乐后台播放
NSString *musicPath = [[NSBundle mainBundle] pathForResource:@"净土" ofType:@"mp3"]; if (musicPath) { NSURL *musicURL = [NSURL原创 2012-12-06 15:30:41 · 790 阅读 · 0 评论 -
ios 锁定 屏幕旋转
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { //return YES; return (interfaceOrientation == UIInterfaceOrientationPortrait); }原创 2012-12-06 15:30:50 · 1105 阅读 · 0 评论 -
UIButton 传值
-(void)OpenThree:(id)sender;[btn addTarget:self action:@selector(OpenThree:) forControlEvents:UIControlEventTouchUpInside];[btn setTag:1];-(void)OpenThree:(id)sender{ int selfIndex = [sender tag];原创 2012-12-06 15:30:56 · 998 阅读 · 0 评论 -
google纠偏数据库
http://zzili.blog.163.com/blog/static/193620024201272554948935/原创 2012-12-06 15:31:19 · 1023 阅读 · 0 评论 -
UITabBar
#define SYSTABBARITEM(TITLE, INAME, TAG) [[UITabBarItem alloc] initWithTitle:TITLE image:[UIImage imageNamed:INAME] tag:TAG] NSMutableArray *tbitems = [NSMutableArray array]; [tbitems addObject:S原创 2012-12-06 15:31:51 · 877 阅读 · 0 评论 -
ios 文件管理 获取文件属性 读取文件
1、文件的创建-(IBAction) CreateFile{//对于错误信息NSError *error;// 创建文件管理器NSFileManager *fileMgr = [NSFileManager defaultManager];//指向文件目录NSString *documentsDirectory= [NSHomeDirectory() stringByAppendin转载 2012-12-06 15:42:04 · 1302 阅读 · 0 评论 -
viewwillappear和viewdidload区别
viewWillAppear: Called when the view is about to made visible. Default does nothing视图即将可见时调用。默认情况下不执行任何操作viewDidAppear: Called when the view has been fully transitioned onto the screen. Default does n原创 2012-12-06 15:29:42 · 839 阅读 · 0 评论 -
弹出提示窗口
UIAlertView *myAlert = [[UIAlertView alloc]initWithTitle:@"显示时间" message:tmpStr delegate:self cancelButtonTitle:@"取消" otherButtonTitles:nil]; //AlertView弹出 [myAlert show];原创 2012-12-06 15:29:49 · 796 阅读 · 0 评论 -
UIScrollView
@property (retain, nonatomic) IBOutlet UIScrollView *ScrollView; [ScrollView setScrollEnabled:YES]; [ScrollView setContentSize:CGSizeMake(320,460)]; [ScrollView setScrollsToTop:YES]原创 2012-12-06 15:30:26 · 736 阅读 · 0 评论 -
GPS坐标换算
30.8872 =====》——>300.8872*60 = 53.232 ——>530.232*60 = 13.9230: 53' 13.92"30: 53' 13.92"=======》30+53/60+13.92/3600=30.887199同经度两点之间距离dla=30.887m * [差值/(1/3600)] = 30.887m * 差值 *3600 = 111193.2m * 差原创 2012-12-06 15:30:28 · 1481 阅读 · 0 评论 -
iphone 获取 设备号
UIDevice *device = [UIDevice currentDevice];//创建设备对象 NSString *deviceUID = [[NSString alloc] initWithString:[device uniqueIdentifier]]; UIAlertView *view = [[UIAlertView alloc]initWithTitle:ni原创 2012-12-06 15:30:39 · 861 阅读 · 0 评论 -
UITextView设置边框
#import _weiboText.layer.borderWidth =1.0; _weiboText.layer.cornerRadius =5.0;原创 2012-12-06 15:30:46 · 902 阅读 · 0 评论 -
IOS AlertView 自动消失
UIAlertView *alert; - (IBAction)Open:(id)sender { alert = [[UIAlertView alloc] initWithTitle:@"msg" message:@"sss" delegate:self cancelButtonTitle:@"取消" otherButtonTitles原创 2012-12-06 15:31:26 · 1034 阅读 · 0 评论 -
弹出菜单
- (IBAction)Open:(id)sender { UIActionSheet *menu = [[UIActionSheet alloc] initWithTitle:@"select" delegate:self cancelButtonTitle:@"cancel" destructiveButtonTitle:@"del原创 2012-12-06 15:31:41 · 818 阅读 · 0 评论 -
UIProgressHUD
@interface UIProgressHUD : NSObject - (void) show: (BOOL) yesOrNo; - (UIProgressHUD *) initWithWindow: (UIView *) window; @end @interface HelloController : UIViewController @end @implementation Hell原创 2012-12-06 15:31:43 · 1140 阅读 · 0 评论 -
ios下载文件
1.同步下载文件 NSString *urlAsString = @"http://files.cnblogs.com/zhuqil/UIWebViewDemo.zip"; NSURL *url = [NSURL URLWithString:urlAsString]; NSURLRequest *request = [NSURLRequest requ原创 2012-12-06 15:31:45 · 763 阅读 · 0 评论 -
IOS播放音乐
NSString *audioPath =[[NSBundle mainBundle]pathForResource:@"aaa" ofType:@"m4a"]; NSURL *url = [NSURL fileURLWithPath:audioPath]; NSError *error; audioPlayer = [[AVAudioPlayer alloc]initWithC原创 2012-12-06 15:29:45 · 752 阅读 · 0 评论 -
picker view
////////////////////////////获取当前选的 NSInteger selectedRow=[myPickerView selectedRowInComponent:0]; ////////////////////////////////显示 -(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)原创 2012-12-06 15:29:47 · 834 阅读 · 0 评论 -
iOS后台播放背景音乐文件
iOS从4.0之后支持后台播放声音了。下面是实现声音文件播放,并且用户关闭屏幕之后仍然能够播放声音文件。具体的实现方法如下: 在plist文件中加入下面的字段: 声明内容如下: Info.plist中添加UIBackgroundModes键值,它包含一个或多个string的值,包括 audio:在后台提供声音播放功能,包括音频流和播放视频时的声音 location:在后台可以保持用户原创 2012-12-06 15:29:51 · 884 阅读 · 0 评论 -
Timer
NSTimer timer =[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(timerFired:) userInfo:nil repeats:YES];-(void)timerFired:(NSTimer *)theTimer{ myLabel.text=@"timer";}原创 2012-12-06 15:29:58 · 697 阅读 · 0 评论 -
Sqlite
if (sqlite3_open([[[[NSBundle mainBundle] pathForResource:@"wxs" ofType:@"db"] retain] fileSystemRepresentation], &database)==SQLITE_OK) { NSLog(@"open sqlite db ok."); } ///////原创 2012-12-06 15:30:30 · 709 阅读 · 0 评论 -
ios 进入 等待时间
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [NSThread sleepForTimeInterval:1.0]; NSLog(@"didFinishLaunchingWithOptions");原创 2012-12-06 15:30:52 · 908 阅读 · 0 评论 -
Touch Move
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { if (!dragEnable) { return; } UITouch *touch = [touches anyObject]; beginPoint = [touch locationInView:se原创 2012-12-06 15:31:07 · 816 阅读 · 0 评论 -
UIAlertView添加textField
- (IBAction)Open:(id)sender { UIAlertView* dialog = [[UIAlertView alloc] initWithTitle:@"Enter Name" message:@"" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Add",nil];原创 2012-12-06 15:31:28 · 1474 阅读 · 0 评论 -
WebView
CGRect webFrame = [[UIScreen mainScreen] applicationFrame]; webFrame.origin.y += kTopMargin + 5.0; // leave from the URL input field and its label webFrame.size.height -= 40.0; myWebView =原创 2012-12-06 15:29:56 · 869 阅读 · 0 评论 -
IPhone mapView
一.基本知识目前主流的智能手机大部分都支持GoogleMap地图程序,而手机上的地图程序确实能给我们的出行带来很大的方便。在iPhone中利用MapKit框架可以很方便的显示Google地图,并且可以在地图上添加标注。二.具体介绍1.MKMapView的显示(1)创建MKMapViewCGRect rect = CGRectMake(0, 20, 320, 460);MKMapView *mapV原创 2012-12-06 15:30:04 · 816 阅读 · 0 评论 -
页面动画
ATFrom: UIViewAnimationTransitionCurlUp UIViewAnimationTransitionCurlDown UIViewAnimationTransitionFlipFromLeft UIViewAnimationTransitionFlipFromRight-(id) AnimationTransition:(UIViewAni原创 2012-12-06 15:30:24 · 757 阅读 · 0 评论 -
NKMapView 显示标注,并放大到标注位置
- (IBAction)FindUs:(id)sender { self.UsMap.hidden = NO; CLLocationCoordinate2D coord; coord.latitude = 34.7993; coord.longitude = 113.6939; POI *poi = [[POI alloc]initWithCoords:co原创 2012-12-06 15:30:43 · 847 阅读 · 0 评论 -
将UIImage保存到相册
UIImageWriteToSavedPhotosAlbum(viewImage,nil, nil, nil);原创 2012-12-06 15:30:48 · 1073 阅读 · 0 评论 -
截取视频缩略图
UIImage *image =[self getImage:[[NSBundle mainBundle] pathForResource:@"video" ofType:@"mp4"]];+(UIImage *)getImage:(NSString *)videoURL{ NSDictionary *opts = [NSDictionary dictionaryWithObject:[NS原创 2012-12-06 15:30:54 · 961 阅读 · 0 评论 -
两个UIImage 叠加
-(UIImage *)addImage:(UIImage *)image1 toImage:(UIImage *)image2 { UIGraphicsBeginImageContext(image2.size); //Draw image2 [image2 drawInRect:CGRectMake(0, 0, image2.size.width, image原创 2012-12-06 15:30:58 · 1439 阅读 · 0 评论 -
wxs旅游增强
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{ UIButton *leftBtn = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; [leftBtn addTarget:se原创 2012-12-06 15:31:01 · 742 阅读 · 0 评论 -
IOS调取系统摄像头并拍照
UIImagePickerControllerDelegate>1、打开摄像头 - (IBAction)Open:(id)sender { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; if([UIImagePickerController isSourceTypeA原创 2012-12-06 15:31:39 · 1299 阅读 · 0 评论 -
IOS UIPageController
- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. //定义UIScrollView //self.scrollView = [[UIScrollView alloc] init]; /原创 2012-12-06 15:31:49 · 985 阅读 · 0 评论 -
通讯录增删改查
CoreFoundaion.frameworkAddressBook.framework#import "AddressBook/AddressBook.h" ABAddressBookRef addressBook = ABAddressBookCreate(); //初始化一个record ABRecordRef perso原创 2012-12-10 17:59:27 · 1273 阅读 · 0 评论