`
gekie
  • 浏览: 158142 次
  • 性别: Icon_minigender_1
  • 来自: 海口
社区版块
存档分类
最新评论
阅读更多
修改navigation bar的button样式:

UIButton *BackBtn = [[UIButton alloc] initWithFrame:CGRectMake(0.0, 100.0, 62.0, 29.0)];
[BackBtn setImage:[UIImage imageNamed:@"BackBtn.png"] forState:UIControlStateNormal];
[BackBtn addTarget:self action:@selector(BackAction:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *BackBarBtn = [[UIBarButtonItem alloc] initWithCustomView:BackBtn];
NavBar.topItem.leftBarButtonItem = BackBarBtn;
[BackBtn release];
[BackBarBtn release];

添加TTButton:

TTButton *_tButton = [TTButton buttonWithStyle:@"toolbarBackButton:" title:@"主页"];

[_tButton addTarget:self action:@selector(clickback) forControlEvents:UIControlEventTouchUpInside];

_tButton.frame = CGRectMake(0, 0, 55, 35);

UIBarButtonItem *_barItem = [ [ UIBarButtonItem alloc] initWithCustomView:_tButton];

self.navigationItem.leftBarButtonItem = _barItem;

0
Filed under:
iPhone by admin
iphone开发常用代码
一月 30, 2011
- (NSString *)URLEncodedString:(NSString *)string{

NSString *result = (NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
(CFStringRef)string,NULL,CFSTR(“!*’();:@&=+$,/?%#[]“),kCFStringEncodingUTF8);
[result autorelease];
return result;
}

//生成nonce
- (NSString *)generateNonce{
CFUUIDRef theUUID = CFUUIDCreate(NULL);
CFStringRef string = CFUUIDCreateString(NULL, theUUID);
NSMakeCollectable(theUUID);
return [(NSString *)string stringByReplacingOccurrencesOfString:@"-" withString:@""];
//return (NSString *)string;
}

//生成Timestamp
- (NSString *)generateTimestamp{
return [[NSString stringWithFormat:@"%d", time(NULL)] retain];
}

iPhone键盘改变颜色
只有这2种数字键盘才有效果:UIKeyboardTypeNumberPad,UIKeyboardTypePhonePad
keyboardAppearance = UIKeyboardAppearanceAlert
代码如下:
NSArray *ws = [[UIApplication sharedApplication] windows];     for(UIView *w in ws){         NSArray *vs = [w subviews];         for(UIView *v in vs){             if([[NSString stringWithUTF8String:object_getClassName(v)] isEqualToString:@”UIKeyboard”]){                 v.backgroundColor = [UIColor redColor];             }         }     }从一个界面push到下一界面左上角返回按钮文字设置在父viewController中如下设置:
UIBarButtonItem *backbutton = [[UIBarButtonItem alloc]init];
backbutton.title = @”返回列表”;
self.navigationItem.backBarButtonItem = backbutton;
[backbutton release];

navigationbar的back键触发其他事件
UIButton *back =[[UIButton alloc] initWithFrame:CGRectMake(200, 25, 63, 30)];
[back addTarget:self action:@selector(reloadRowData:) forControlEvents:UIControlEventTouchUpInside];
[back setImage:[UIImage imageNamed:@"返回按钮.png"] forState:UIControlStateNormal];
UIBarButtonItem *backButtonItem = [[UIBarButtonItem alloc] initWithCustomView:back];
self.navigationItem.leftBarButtonItem = loginButtonItem
[back release];
[backButtonItem release];
防止屏幕暗掉锁屏

[[UIApplication sharedApplication] setIdleTimerDisabled:YES];

将图片从左到右翻页效果显示

UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 0, 470)];
[imageView setImage:[UIImage imageNamed:@"Bg.jpg"]];
self.myImageView =imageView;
[self.view addSubview:imageView];
[imageView release];
CGContextRef context = UIGraphicsGetCurrentContext();
[UIView beginAnimations:nil context:context];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.5];
[myImageView setFrame:CGRectMake(0, 0, 310, 470)];
[UIView commitAnimations];

让覆盖在下面层的视图接受触摸事件

searchImage.exclusiveTouch = YES;//第一层
searchImage.userInteractionEnabled = NO;
myMapView.exclusiveTouch = NO;//第二层
myMapView.userInteractionEnabled = YES;

View的缩放

NSValue *touchPointValue = [[NSValue valueWithCGPoint:CGPointMake(100,100)] retain];
[UIView beginAnimations:nil context:touchPointValue];
transform = CGAffineTransformMakeScale(0.1,0.21);
firstPieceView.transform = transform;
[UIView commitAnimations];

代码循环添加按钮,其他空间也可以用类似方法添加

- (void)viewDidLoad {
[super viewDidLoad];
for(int i = 0; i < 5; i++){
CGRect frame;
Btn[i] = [[UIButton buttonWithType:UIButtonTypeCustom] retain];
[Btn[i] setImage:[UIImage imageNamed:@"Button.png"] forState:UIControlStateNormal];//设置按钮图片
frame.size.width = 55;//设置按钮坐标及大小
frame.size.height = 84;
frame.origin.x = (i%5)*57+5;
frame.origin.y = 10;
[Btn[i] setFrame:frame];
[Btn[i] setBackgroundColor:[UIColor clearColor]];
[Btn[i] addTarget:self action:@selector(btnPressed:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:Btn[i]];
[Btn[i] release];
}
}
//响应按钮事件
-(void)btnPressed:(id)sender{
for(int i = 0; i < 5;i++){
if([sender isEqual:Btn[i]]){
NSLog(@”Btn[%d]:”,i);
}
}
}

去除nsstring中的空格,table 以及newline,nextline

NSCharacterSet *whitespace = [NSCharacterSet whitespaceAndNewlineCharacterSet ];
NSString *username = [mUsernameField stringValue];
username = [username stringByTrimmingCharactersInSet :whitespace];

UIImagePickerController

用UIImagePickerController 选择、显示图片或视频,主要注意UIImagePickerController 几个属性的设置
一:UI 显示样式,显示的格式确定
1:sourceType 
@property(nonatomic) UIImagePickerControllerSourceType sourceType
enum {
UIImagePickerControllerSourceTypePhotoLibrary,
UIImagePickerControllerSourceTypeCamera,
UIImagePickerControllerSourceTypeSavedPhotosAlbum
};
typedef NSUInteger UIImagePickerControllerSourceType;
sourceType用来 确定用户界面显示的样式:
共三种格式(模拟器上的效果图)
UIImagePickerControllerSourceTypePhotoLibrary,
UIImagePickerControllerSourceTypeCamera,


UIImagePickerControllerSourceTypeSavedPhotosAlbum
 
为了区分是否支持视频格式,一般要用到下面这个函数,以便确定mediaTypes。
+ (BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType
2:   mediaTypes 
@property(nonatomic,copy) NSArray *mediaTypes
mediaTypes用来确定再picker里显示那些类型的多媒体文件,图片?视频?
+ (NSArray *)availableMediaTypesForSourceType:(UIImagePickerControllerSourceType)sourceType
二:选取动作处理
UIImagePickerControllerDelegate 
通过代理来完成用户在选中图片,或者choose视频时的处理方式:

共有三个可选的代理方法
– imagePickerController:didFinishPickingMediaWithInfo:
– imagePickerControllerDidCancel:
– imagePickerController:didFinishPickingImage:editingInfo:   Deprecated in iPhone OS 3.0

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
info中包括选取的照片,视频的主要信息
NSString *const UIImagePickerControllerMediaType;         选取的类型 public.image  public.movie
NSString *const UIImagePickerControllerOriginalImage;    修改前的UIImage object.
NSString *const UIImagePickerControllerEditedImage;      修改后的UIImage object.
NSString *const UIImagePickerControllerCropRect; 原始图片的尺寸NSValue object containing a CGRect data type
NSString *const UIImagePickerControllerMediaURL;          视频在文件系统中 的 NSURL地址
保存视频主要时通过获取其NSURL 然后转换成NSData
实例代码如下:

- (void) pickImage: (id) sender

{

UIImagePickerController *ipc = [[UIImagePickerController alloc] init];

if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]){

ipc.sourceType =  UIImagePickerControllerSourceTypePhotoLibrary;

ipc.mediaTypes =[UIImagePickerController availableMediaTypesForSourceType:ipc.sourceType];

}

ipc.delegate = self;

ipc.allowsImageEditing = NO;

[self presentModalViewController:ipc animated:YES];

}

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{

NSString *mediaType = [info objectForKey:UIImagePickerControllerMediaType];

if ([mediaType isEqualToString:@"public.image"]){

//UIImage *selectedImage = [info objectForKey:UIImagePickerControllerOriginalImage];

UIImage *image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];

NSLog(@”found an image”);

[UIImageJPEGRepresentation(image, 1.0f) writeToFile:[self findUniqueSavePath] atomically:YES];

SETIMAGE(image);

CFShow([[NSFileManager defaultManager] directoryContentsAtPath:[NSHomeDirectory() stringByAppendingString:@"/Documents"]]);

}

else if ([mediaType isEqualToString:@"public.movie"]){

NSURL *videoURL = [info objectForKey:UIImagePickerControllerMediaURL];

NSLog(@”found a video”);

NSData *webData = [NSData dataWithContentsOfURL:videoURL];

//NSData *video = [[NSString alloc] initWithContentsOfURL:videoURL];

[webData writeToFile:[self findUniqueMoviePath] atomically:YES];

CFShow([[NSFileManager defaultManager] directoryContentsAtPath:[NSHomeDirectory() stringByAppendingString:@"/Documents"]]);

//NSLog(videoURL);

}

[picker dismissModalViewControllerAnimated:YES];

}


UITextInputTraits属性

autocapitalizationType            设置键盘自动大小写的属性     UITextAutocapitalizationTypeNone
autocorrectionType  property  设置是否有自动修改提示   UITextAutocorrectionTypeNo
enablesReturnKeyAutomatically   Boolean值-设置在用户没有输入是returnKey禁用,默认值NO
keyboardAppearance  设置键盘显示方式  除了默认模式  还有一个UIKeyboardAppearanceAlert模式
keyboardType               设置键盘类型   UIKeyboardTypePhonePad 等
returnKeyType              设置renturnKey按键上的提示文字     UIReturnKeyGo   UIReturnKeyNext
secureTextEntry BOOL值  -- 设置是否是密码保护模式输入

如下:
设置登录用的 输入框 UITextField
用户名输入框:
m_TF_username = [[UITextField alloc] initWithFrame:my_frame];
m_TF_username.borderStyle = UITextBorderStyleNone;
m_TF_username.clearButtonMode = UITextFieldViewModeWhileEditing;
m_TF_username.delegate = self;
m_TF_username.returnKeyType = UIReturnKeyNext;
m_TF_username.autocapitalizationType = UITextAutocapitalizationTypeNone;
[m_TF_username becomeFirstResponder];
密码输入框:
m_TF_password = [[UITextField alloc] initWithFrame:my_frame];
m_TF_password.borderStyle = UITextBorderStyleNone;
m_TF_password.clearButtonMode = UITextFieldViewModeWhileEditing;
m_TF_password.delegate = self;
m_TF_password.returnKeyType = UIReturnKeyGo;
m_TF_password.secureTextEntry =YES;

键盘透明
textField.keyboardAppearance = UIKeyboardAppearanceAlert;

状态栏的网络活动风火轮是否旋转
[UIApplication sharedApplication].networkActivityIndicatorVisible,默认值是NO。

截取屏幕图片
//创建一个基于位图的图形上下文并指定大小为CGSizeMake(200,400)
UIGraphicsBeginImageContext(CGSizeMake(200,400));

//renderInContext 呈现接受者及其子范围到指定的上下文
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];

//返回一个基于当前图形上下文的图片
UIImage *aImage = UIGraphicsGetImageFromCurrentImageContext();

//移除栈顶的基于当前位图的图形上下文
UIGraphicsEndImageContext();

//以png格式返回指定图片的数据
imageData = UIImagePNGRepresentation(aImage);

更改cell选中的背景
UIView *myview = [[UIView alloc] init];
myview.frame = CGRectMake(0, 0, 320, 47);
myview.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"0006.png"]];
cell.selectedBackgroundView = myview;

在数字键盘上添加button:
//定义一个消息中心
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil]; //addObserver:注册一个观察员 name:消息名称
- (void)keyboardWillShow:(NSNotification *)note {
// create custom button
UIButton *doneButton = [UIButton buttonWithType:UIButtonTypeCustom];
doneButton.frame = CGRectMake(0, 163, 106, 53);
[doneButton setImage:[UIImage imageNamed:@"5.png"] forState:UIControlStateNormal];
[doneButton addTarget:self action:@selector(addRadixPoint) forControlEvents:UIControlEventTouchUpInside];

// locate keyboard view
UIWindow* tempWindow = [[[UIApplication sharedApplication] windows] objectAtIndex:1];//返回应用程序window
UIView* keyboard;
for(int i=0; i<[tempWindow.subviews count]; i++) //遍历window上的所有subview
{
keyboard = [tempWindow.subviews objectAtIndex:i];
// keyboard view found; add the custom button to it
if([[keyboard description] hasPrefix:@”<UIKeyboard”] == YES)
[keyboard addSubview:doneButton];
}
}

正则表达式使用:
被用于正则表达式的字串必须是可变长的,不然会出问题

将一个空间放在视图之上
[scrollView insertSubview:searchButton aboveSubview:scrollView];

从本地加载图片
NSString *boundle = [[NSBundle mainBundle] resourcePath];
[web1 loadHTMLString:[NSString stringWithFormat:@"<img src='http://fei263.blog.163.com/blog/0001.png'/>"] baseURL:[NSURL fileURLWithPath:boundle]];

从网页加载图片并让图片在规定长宽中缩小
[cell.img loadHTMLString:[NSString stringWithFormat:@"<html><body><img src='http://fei263.blog.163.com/blog/%@' height='90px' width='90px'></body></html>",goodsInfo.GoodsImg] baseURL:nil];
将网页加载到webview上通过javascript获取里面的数据,如果只是发送了一个连接请求获取到源码以后可以用正则表达式进行获取数据
NSString *javaScript1 = @”document.getElementsByName(‘.u’).item(0).value”;
NSString *javaScript2 = @”document.getElementsByName(‘.challenge’).item(0).value”;
NSString *strResult1 = [NSString stringWithString:[theWebView stringByEvaluatingJavaScriptFromString:javaScript1]];
NSString *strResult2 = [NSString stringWithString:[theWebView stringByEvaluatingJavaScriptFromString:javaScript2]];

用NSString怎么把UTF8转换成unicode
utf8Str //
NSString *unicodeStr = [NSString stringWithCString:[utf8Str UTF8String] encoding:NSUnicodeStringEncoding];

View自己调用自己的方法:
[self performSelector:@selector(loginToNext) withObject:nil afterDelay:2];//黄色段为方法名,和延迟几秒执行.

显示图像:
CGRect myImageRect = CGRectMake(0.0f, 0.0f, 320.0f, 109.0f);
UIImageView *myImage = [[UIImageView alloc] initWithFrame:myImageRect];
[myImage setImage:[UIImage imageNamed:@"myImage.png"]];
myImage.opaque = YES; //opaque是否透明
[self.view addSubview:myImage];
[myImage release];

WebView:
CGRect webFrame = CGRectMake(0.0, 0.0, 320.0, 460.0);
UIWebView *webView = [[UIWebView alloc] initWithFrame:webFrame];
[webView setBackgroundColor:[UIColor whiteColor]];
NSString *urlAddress = @”http://www.google.com”;
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];
[self addSubview:webView];
[webView release];

显示网络活动状态指示符
这是在iPhone左上部的状态栏显示的转动的图标指示有背景发生网络的活动。
UIApplication* app = [UIApplication sharedApplication];
app.networkActivityIndicatorVisible = YES;

动画:一个接一个地显示一系列的图象
NSArray *myImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"myImage1.png"], [UIImage imageNamed:@"myImage2.png"], [UIImage imageNamed:@"myImage3.png"], [UIImage imageNamed:@"myImage4.gif"], nil];
UIImageView *myAnimatedView = [UIImageView alloc];
[myAnimatedView initWithFrame:[self bounds]];
myAnimatedView.animationImages = myImages; //animationImages属性返回一个存放动画图片的数组
myAnimatedView.animationDuration = 0.25; //浏览整个图片一次所用的时间
myAnimatedView.animationRepeatCount = 0; // 0 = loops forever 动画重复次数
[myAnimatedView startAnimating];
[self addSubview:myAnimatedView];
[myAnimatedView release];

动画:显示了something在屏幕上移动。注:这种类型的动画是“开始后不处理” -你不能获取任何有关物体在动画中的信息(如当前的位置) 。如果您需要此信息,您会手动使用定时器去调整动画的X和Y坐标
这个需要导入QuartzCore.framework
CABasicAnimation *theAnimation;
theAnimation=[CABasicAnimation animationWithKeyPath:@"transform.translation.x"];
//Creates and returns an CAPropertyAnimation instance for the specified key path.
//parameter:the key path of the property to be animated
theAnimation.duration=1;
theAnimation.repeatCount=2;
theAnimation.autoreverses=YES;
theAnimation.fromValue=[NSNumber numberWithFloat:0];
theAnimation.toValue=[NSNumber numberWithFloat:-60];
[view.layer addAnimation:theAnimation forKey:@"animateLayer"];

Draggable items//拖动项目
Here’s how to create a simple draggable image.//这是如何生成一个简单的拖动图象
1. Create a new class that inherits from UIImageView
@interface myDraggableImage : UIImageView { }
2. In the implementation for this new class, add the 2 methods:
- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
{
// Retrieve the touch point 检索接触点
CGPoint pt = [[touches anyObject] locationInView:self];
startLocation = pt;
[[self superview] bringSubviewToFront:self];
}
- (void) touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event
{
// Move relative to the original touch point 相对以前的触摸点进行移动
CGPoint pt = [[touches anyObject] locationInView:self];
CGRect frame = [self frame];
frame.origin.x += pt.x – startLocation.x;
frame.origin.y += pt.y – startLocation.y;
[self setFrame:frame];
}
3. Now instantiate the new class as you would any other new image and add it to your view
//实例这个新的类,放到你需要新的图片放到你的视图上
dragger = [[myDraggableImage alloc] initWithFrame:myDragRect];
[dragger setImage:[UIImage imageNamed:@"myImage.png"]];
[dragger setUserInteractionEnabled:YES];

线程:
1. Create the new thread:
[NSThread detachNewThreadSelector:@selector(myMethod) toTarget:self withObject:nil];
2. Create the method that is called by the new thread:
- (void)myMethod
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
*** code that should be run in the new thread goes here ***
[pool release];
}
//What if you need to do something to the main thread from inside your new thread (for example, show a loading //symbol)? Use performSelectorOnMainThread.
[self performSelectorOnMainThread:@selector(myMethod) withObject:nil waitUntilDone:false];

Plist files
Application-specific plist files can be stored in the Resources folder of the app bundle. When the app first launches, it should check if there is an existing plist in the user’s Documents folder, and if not it should copy the plist from the app bundle.
// Look in Documents for an existing plist file
NSArray *paths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
myPlistPath = [documentsDirectory stringByAppendingPathComponent:
[NSString stringWithFormat: @"%@.plist", plistName] ];
[myPlistPath retain];
// If it’s not there, copy it from the bundle
NSFileManager *fileManger = [NSFileManager defaultManager];
if ( ![fileManger fileExistsAtPath:myPlistPath] )
{
NSString *pathToSettingsInBundle = [[NSBundle mainBundle] pathForResource:plistName ofType:@”plist”];
}
//Now read the plist file from Documents
NSArray *paths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectoryPath = [paths objectAtIndex:0];
NSString *path = [documentsDirectoryPath stringByAppendingPathComponent:@"myApp.plist"];
NSMutableDictionary *plist = [NSDictionary dictionaryWithContentsOfFile: path];
//Now read and set key/values
myKey = (int)[[plist valueForKey:@"myKey"] intValue];
myKey2 = (bool)[[plist valueForKey:@"myKey2"] boolValue];
[plist setValue:myKey forKey:@"myKey"];
[plist writeToFile:path atomically:YES];

Alerts
Show a simple alert with OK button.
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:
@”An Alert!” delegate:self cancelButtonTitle:@”OK” otherButtonTitles:nil];
[alert show];
[alert release];

Info button
Increase the touchable area on the Info button, so it’s easier to press.
CGRect newInfoButtonRect = CGRectMake(infoButton.frame.origin.x-25, infoButton.frame.origin.y-25, infoButton.frame.size.width+50, infoButton.frame.size.height+50);
[infoButton setFrame:newInfoButtonRect];

Detecting Subviews
You can loop through subviews of an existing view. This works especially well if you use the “tag” property on your views.
for (UIImageView *anImage in [self.view subviews])
{
if (anImage.tag == 1)
{ // do something }
}
分享到:
评论

相关推荐

    iPhone XCODE 快捷键汇总

    ### iPhone Xcode 快捷键汇总与使用技巧详解 Xcode 是苹果官方为开发者提供的集成开发环境(Integrated Development Environment, IDE),主要用于iOS、iPadOS、macOS、watchOS 和 tvOS 的应用程序开发。掌握Xcode ...

    iPhone Chart XCode Project and Source Code

    本项目“iPhone Chart XCode Project and Source Code”提供了一个使用Objective-C编写的图表库,支持在iPhone上展示饼图、线图和柱状图,并具有一定的交互功能。尽管它可能不是最完美的解决方案,但相比许多基础...

    iphone kvo code

    不过,在Objective-C项目中,KVO仍然是一个常用的工具。 总结来说,KVO是iOS开发中一种重要的数据绑定和状态监控技术,它使得对象之间的通信更加灵活,简化了属性变化的处理流程。理解和熟练使用KVO,对于提升iOS...

    【From Idea to App+code】[PDF+源代码] [iPhone/iPad/iOS]

    《From Idea to App+code》是一本专注于iPhone、iPad以及iOS平台应用开发的专业教程,它旨在帮助开发者将创新的想法转化为实际的应用程序。该资源包含了PDF文档和源代码,为学习者提供理论与实践的双重指导。 一、...

    cocos2d-iphone开发

    - **关键类与方法**:介绍Cocos2D-iPhone中的核心类(如`CCSprite`, `CCScene`, `CCDirector`等)及其常用方法。 #### 六、编译帮助文档 - **文档生成工具**:使用Doxygen等工具自动生成API文档。 - **查看文档**:...

    iphone的简单例程

    首先,"code example"标签暗示了这是一个关于编程实践的示例,它可能包含了一段具体的代码或一个小型项目,目的是为了展示如何在Xcode中创建并运行一个基础的iPhone应用。在Xcode中,开发者通常会使用Swift或...

    tank war source code

    在这个文件中,我们可能找到C++、Objective-C或者Swift等编程语言编写的源代码,这些都是iPhone游戏开发常用的编程语言。此外,资源文件如图像、音频和配置文件也可能包含其中,这些都是构建游戏环境和交互体验的...

    iphone开发例子

    描述中提到,这个资源集合旨在帮助那些正在进行或准备进行iPhone开发的朋友们,因此我们将详细讲解如何利用提供的"Code Examples"来学习和实践。 首先,iPhone开发主要基于Apple的iOS操作系统,使用Objective-C或...

    iphone安全开发

    加密解密是信息安全的基础,常用的加密技术包括: 1. **对称加密**:使用相同的密钥进行加密和解密的过程。常见的对称加密算法有AES、DES等。 2. **非对称加密**:使用一对密钥(公钥和私钥)进行加密解密的过程。...

    【工具】-iPhone、iPad 网页抓取工具源码.7z

    在iOS应用中,我们常用NSURLSession或第三方库如AFNetworking来实现网络请求。iXpather源码中可能包含了这些API的使用,通过HTTP或HTTPS协议获取网页内容。数据抓取可能涉及HTML解析,如使用NSXMLParser或第三方库如...

    iOS游戏应用源代码——tototti-Sendai.iPhone-ver1.3-sample-4c1a743.zip

    在iOS平台上开发游戏,最常用的语言是Objective-C和Swift,其中Swift是近年来逐渐成为主流的选择,因为它提供了更现代的语法和更好的性能。考虑到“ver1.3-sample”的标签,这个源代码可能是作为示例或教学用途的,...

    自定义照相机和图片滤镜效果(iPhone源代码)

    来源:Licence:Custom平台:iOS设备:iPhone / iPad作者:吴伟彬同學  自定义照相机界面功能,以及图片滤镜效果,包括十几种常用的滤镜效果。 小编注:对于实现照相以及图片处理功能,小编推荐这份代码。感谢...

    android开发常用快捷键

    在Android开发过程中,掌握常用的快捷键能够显著提升开发效率,减少不必要的鼠标操作,使编码更加流畅。以下是一些Android开发中常见的快捷键及其用途: **模拟器使用中的快捷键:** 1. **Home键**: 小房子键,...

    (0129)-iOS/iPhone/iPAD/iPod源代码-进度条(Progress)-Colored ProgressView

    在iOS开发中,UIProgressView是一个非常常用的控件,用于展示任务的进度状态,比如下载、上传或者其他耗时操作。然而,苹果提供的默认UIProgressView的进度颜色是固定的蓝色,对于许多开发者来说,可能需要根据自己...

    iOS DevCamp幻灯片分享:社区类iPhone应用开发的技术实践 | 麻麻帮 陈剑飞

    陈剑飞分享了一些常用的快捷键,比如 Command + Up 可以上移当前选中的代码行,Command + L 能够快速跳转到指定行号,Shift + Command + F 可以格式化代码等。此外,他还介绍了 Xcode 中的实用功能,如 #pragma mark...

    利用QuickLook查看文件(iPhone源代码)

    来源:Licence:Custom平台:iOS设备:iPhone / iPad作者:yangjw_go  iOS自身带有快捷查看文件方式的框架 ,可以对一些常用资源文件进行查看,能够查看的文件格式包括图片,word,ppt,pdf等。Demo是读取和查看...

    jQuery仿iPhone中文键盘插件

    &lt;script src="https://code.jquery.com/jquery-3.x.min.js"&gt;&lt;/script&gt; &lt;script src="jquery.iphonekeyboard.js"&gt; ``` 然后,为需要添加虚拟键盘的输入框添加特定的CSS类或者ID,并在文档加载完成后初始化插件,如: ...

    ]ZBarBarcodeReader

    在iOS平台上,开发者可以利用各种库来实现二维码的生成和扫描功能,其中ZBarSDK是一个常用的选择。本文将详细探讨ZBarBarcodeReader,它是基于ZBarSDK实现的iPhone应用,用于读取和生成二维码。 首先,我们需要了解...

    23套Axure原文件,包含移动端原型,PC端原型,支付宝/微信小程序、后台管理原型模板

    10.常用手机设备模型.rp 11.矢量插图.rp 12.交互手势图标列表.rp 13.设备模型展示方案模板.rp 14.手机移动端交互原型.rp 15.手机端演示方案模板.rp 16.iPhoneX And iPhone8 Mockup 原型.rp 17.后台产品设计模板.rp ...

    帧动画精灵(iPhone源代码)

    来源:Licence:MIT平台:iOS设备:iPhone / iPad作者:uxyheaven  XYQuickDeveloper 是一个常用方法与常用第三方库的集合。目前实现了一个帧动画精灵类 XYSpriteView。XYSpriteManager 是一个精灵管理类,里面...

Global site tag (gtag.js) - Google Analytics