ios 系统相关
?
?
判断当前设备 是否ipad
?
#define isIPad? UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad
?
?
?
?
剪贴板得到剪贴板?
?
?
在iphone模拟器截屏打开模拟器 按住ctrl键打开编辑菜单,里面会有拷贝屏幕这一项,然后打开预览 文件-》从夹纸板新建NSString *appDocDir = [[[[NSFileManagerdefaultManager] URLsForDirectory:NSDocumentDirectoryinDomains:NSUserDomainMask] lastObject] relativePath];另一种写法 NSString *appDocDir = [[[[NSFileManagerdefaultManager] URLsForDirectory:NSDocumentDirectoryinDomains:NSUserDomainMask] lastObject] relativePath]; NSArray *contentOfFolder = [[NSFileManagerdefaultManager] contentsOfDirectoryAtPath:appDocDir error:NULL]; for (NSString *aPath in contentOfFolder) { NSLog(@"apath: %@", aPath); NSString * fullPath = [appDocDir stringByAppendingPathComponent:aPath]; BOOL isDir; if ([[NSFileManagerdefaultManager] fileExistsAtPath:fullPath isDirectory:&isDir] && !isDir) { [fileList addObject:aPath]; } }??? ??NSURL *home = [[[NSFileManagerdefaultManager] URLsForDirectory:NSDocumentDirectoryinDomains:NSUserDomainMask] lastObject];
? ??NSURL *imaurl = [NSURLURLWithString:@"img2.jpg"relativeToURL:home];
?
UIFileSharingEnabled
?key to your application’s?Info.plist
?file and set the value of the key to?YES
if (UIInterfaceOrientationIsLandscape([UIDevice currentDevice].orientation)) {
To send customers to a specific application:?http://itunes.com/apps/appname
To send customers to a list of apps you have on the App Store:http://itunes.com/apps/developername
To send customers to a specific app with your company name included in the URL:http://itunes.com/apps/developername/appnameA tip is to use itms:// instead of http://, then it'll open in the app store directly. On the iPhone, it will make 2 (!) redirects when using http, and 1 when using itms.White space in app name should just be removedhttp://developer.apple.com/library/ios/#qa/qa1633/_index.html? ??NSURL *requestURL = [NSURLURLWithString:@"http://www.163.com"];
? ? [[UIApplicationsharedApplication] openURL:requestURL];?