自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 unity 真机包乱码解决方案

private bool isFontRebuilt = false; private Font dirtyFont = null; public void Awake () { Font.textureRebuilt += delegate (Font font1) { isFontReb...

2017-10-23 10:48:00 174

转载 Unity3d Editor使用

1:生成类A,用来保存相关数据public class AudioSource : MonoBehaviour{ public AudioClip m_AudioClip; void Awake() { } // Use this for initialization void Start () { }}2:生成类B,...

2014-02-13 11:03:00 104

转载 Unity3D 代码保存prefab

Object tempPrefab = EditorUtility.CreateEmptyPrefab("Assets/res/audio/AudioSourcePrefab/" + gameObject.name + ".prefab");tempPrefab = EditorUtility.ReplacePrefab(gameObject, tempPrefab);转载于:ht...

2014-02-13 10:58:00 1043

转载 Unity3d TweenRotation 使用

/* * parentQuate:需要变换的对像 * angleX,angleY,angleZ: 旋转哪个方向 * angle:需要旋转的角度 0~360 */ static public Quaternion ChangeRotation(GameObject parnetQuate, float angleX, float angleY, floa...

2014-02-13 10:57:00 672

转载 Keyboard 位置变化

#ifdef __IPHONE_5_0 float version = [[[UIDevice currentDevice] systemVersion] floatValue]; if (version >= 5.0) { [[NSNotificationCenter defaultCenter] addObserver:self sel...

2013-12-04 10:22:00 88

转载 [NSArray count]if比较问题

不能够直接使用[NSArray count]在if中做比较,会有错误发生int tempCount = -1;NSArray* array = [[NSArray alloc] init];if( tempCount >= [array count]){ int NewsChangeParam = -1;}因为array是...

2013-10-09 14:08:00 91

转载 正则表达示

//利用正则表达式验证邮箱地址合法性-(BOOL)isValidateEmail:(NSString *)email { NSString *emailRegex = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}"; NSPredicate *emailTest = [NSPredic...

2013-09-30 15:33:00 44

转载 webview设置字体

NSString* string = [[_parentDict objectForKey:@"context"] objectForKey:@"text"]; string = [string stringByReplacingOccurrencesOfString:@"FONT-SIZE"withString:@"a"]; string=[stri...

2013-09-24 14:50:00 126

转载 ios 中文 url encod

将中文转成指定encod 与中文网站交互NSString* string2 = [@"南昌" stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]NSLog string2====%E5%8D%97%E6%98%8C将网站返回的中文字符转为nsstringN...

2013-09-24 11:24:00 89

转载 ios 排序

[Array sortUsingComparator:^NSComparisonResult(id obj1, id obj2) { NSMutableDictionary* tempDict = obj1; NSMutableDictionary* tempDict2 = obj2; NSTimeInterval ...

2013-09-02 09:15:00 57

转载 UIActionSheet 用法

UIActionSheet* _sheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:ContactTel, nil]; [_sheet showInVie...

2013-05-24 16:15:00 70

转载 ios 程序内部调用打电话功能

UIWebView* callWebview =[[UIWebView alloc] init]; NSURL *telURL =[NSURL URLWithString:[NSString stringWithFormat:@"tel://%@", ContactTel]]; [callWebview loadRequest:[NSURLRequ...

2013-05-24 16:14:00 56

转载 ios6.0不在支持udid,使用新的 identifier vendor

[[[UIDevicecurrentDevice] identifierForVendor] UUIDString]转载于:https://www.cnblogs.com/chenan/archive/2013/04/25/3041641.html

2013-04-25 09:04:00 57

转载 UIAlertView会出现丢失控制器的问题

在使用第三方软件比如facebook和weibo时,需要通过UIAlertView的delegate方法打开,如果此时使用的是-(void)alertView:(UIAlertView*)alertView clickedButtonAtIndex:(NSInteger)buttonIndex 就会造成一打开弹框,马上就被关闭了。需要改成此方delegate方法 就不会出现问题了。...

2012-10-25 15:11:00 48

转载 ios-dealloc

1.对象如果不存在了,请将指针置空,养成良好的内存控制习惯。2.[super dealloc];要在dealloc函数的最后调用(类似于C++的析构函数),这样就可以在自身被销毁之前再次调用自身的函数。3.对于某些已经使用(alloc,copy和retain)分配内存的对象,可以直接release,对于可能出现分配内存的对象需要做一次判断再去release(比如点击事件响应的)。...

2012-09-04 15:52:00 172

转载 ios-release理解

@interface classA:NSObject{}@property (nonatomic,retain) UIImageView* imageView;@end@implementation classA@synthesize imageView;-(void)init{ //方法1:使用了get和set方法,但是在实例的时候没...

2012-09-04 15:42:00 108

转载 ios - tag的使用

UIButton* buttonByTag = (UIButton*)[self viewWithTag:100]; //通过tag获得相应的uibutton if( buttonByTag != nil ) [buttonByTag removeFromSuperview];//如果button不为空,则清除之前的显示//初始化button ...

2012-09-03 17:13:00 64

转载 NSUserDefaults

新版本xocde,不可以获得设备的udid。以下是替待udid的方法:NSString* string = [[NSUserDefaults standardUserDefaults] stringForKey:@"deviceId"]; if( [string isEqual:@""]|| string==nil ) { CFUUIDRef d...

2012-08-23 12:38:00 82

空空如也

空空如也

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

TA关注的人

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