ipad

How to detect undock, dock or split is pressed on iPad (iOS 5)

那年仲夏 提交于 2020-01-14 14:31:29
问题 I am trying to detect dock key is pressed or not on my iPad. This dock key is a new feature in iOS 5. When this key is pressed the keyboard disappears. I need to detect it. When this key is pressed I need to change the frame of my view, but I couldn't get any event by pressing this key. I am trying to use the following function: - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text { NSLog(@"TEXT: %@", text); return YES; } When I

APNS notification received but not display

若如初见. 提交于 2020-01-14 13:15:13
问题 I am trying to implement pushnotification. I get pushed message when app is running state. - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { NSLog(@"\n\n\n apns==%@\n\n\n",userInfo); } my problem is when I pushed message when app is not running means badge count only show on the app icon. It will not display the alert like close and view buttons. Even I cont predict - (BOOL)application:(UIApplication *)application

How to save SKProduct object locally?

主宰稳场 提交于 2020-01-14 12:48:51
问题 I have tried to save a SKProduct object with archiving it with the class NSKeyedArchiver but it generates an error as -[SKProduct encodeWithCoder:]: unrecognized selector sent to instance . + (void)saveProduct:(SKProduct *)product { NSData *data = [NSKeyedArchiver archivedDataWithRootObject:product]; [[NSUserDefaults standardUserDefaults] setValue:data forKey:PRODUCT]; [[NSUserDefaults standardUserDefaults] synchronize]; } Is there a way to save an instance of SKProduct or not? 回答1: Your

Windows平台上安装搭建iPhone/iPad的开发环境

回眸只為那壹抹淺笑 提交于 2020-01-14 12:20:16
很多朋友希望在体验或学习iphone开发,但是iphone开发环境一般需要 安装在mac计算机下mac os中。 这给许多朋友带来了额外成本投入。 网上已经有各种破解方法,在非苹果电脑上安装iphone开发环境,给我们带来了佳音。但是各种版本比较杂乱,可能会费时费力而无果。 最近,苹果推出了新的开发环境版本。我将新版开发环境在Windows XP下VMWare虚拟机中安装开发环境过程贴出来,让大家分享。 本文在Windows Xp + VMware Workstation 7.0 + MAC OS X Snow Leopard 10.6 环境下安装iPhone SDK 3.1.2成功! ————————————– 在PC机上安装MAC OS X系统有两种方法: 方法一:在硬盘上分区,专门安装MAC OS X; 方法二:在现有Windows系统中,使用VMWare等虚拟机软件安装Mac OS。 注意:一般都需要将苹果系统的DMG光盘镜像文件刻录到D9光盘上,这个步骤比较麻烦。 本文介绍一下在Windows XP中使用VMWare虚拟机,安装MAC OS X时,无需刻录D9光盘,无需转换成ISO格式, 直接使用MAC OS X和iPhone SDK的DMG镜像文件进行安装的方法。 ————————————– 安装条件: 硬件:一台拥有支持虚拟技术的64位双核处理器和2GB以上内存的PC

Can you determine if Wifi security is enabled on network you're connected to on iOS?

丶灬走出姿态 提交于 2020-01-14 12:18:31
问题 In my iOS app, I'd like to be able to determine whether the Wifi network the device is currently connected to has Wifi security of some sort enabled (wep, wpa, etc). CaptiveNetwork provides the SSID of the connected network, but not much else. Is there an approved way of determining if WEP/WPA/etc are enabled on the currently connected Wifi network? 回答1: Apple is not providing any Wifi related API and all the information that is available to you is given by the actual network, so basically

How to encode Unicode so both iPad and Excel can understand?

时光毁灭记忆、已成空白 提交于 2020-01-14 11:52:08
问题 I have a CSV that is encoded with UTF32. When I open stream in IE and open with Excel I can read everything. On iPad I stream and I get a blank page with no content whatsoever. (I don't know how to view source on iPad so there could be something hidden in HTML). The http response is written in asp.net C# Response.Clear(); Response.Buffer = true; Response.ContentType = "text/comma-separated-values"; Response.AddHeader("Content-Disposition", "attachment;filename=\"InventoryCount.csv\"");

iPad launch orientation when flat issues in app delegate

北城以北 提交于 2020-01-14 10:43:36
问题 Like many people, I have a splash screen that animates off to reveal the first view of my app. I've been reworking this for the iPad and if you are holding the device in portrait or landscape modes, everything works as intended, the correct default image is used, the correct image that is used to animate this off is used, all orientations work fine. BUT If I get the device into landscape mode, and then lay it flat on the table, things go wrong. The correct splash screen is used, but the image

iPad launch orientation when flat issues in app delegate

元气小坏坏 提交于 2020-01-14 10:43:08
问题 Like many people, I have a splash screen that animates off to reveal the first view of my app. I've been reworking this for the iPad and if you are holding the device in portrait or landscape modes, everything works as intended, the correct default image is used, the correct image that is used to animate this off is used, all orientations work fine. BUT If I get the device into landscape mode, and then lay it flat on the table, things go wrong. The correct splash screen is used, but the image

Animating a UIView frame, subview UIScrollView doesn't always animate

与世无争的帅哥 提交于 2020-01-14 08:45:26
问题 In this example. I'm animating the PhotoViewerViewController's frame when I animate out the tabBarController (for fullscreen effect). The PhotoViewer uses a uiscrollview to generate the same sort of effect Apple's photos app does. For whatever reason sometimes it animates along with my PhotoViewer frame, and sometimes it doesn't. You can see in the first example it jumps when increasing the frame size, but animates nicely when decreasing the frame size (and restoring the tab bar). However in

NSError localizedDescription always returns english error message

时光怂恿深爱的人放手 提交于 2020-01-14 07:55:29
问题 Why does an NSError * error object with NSURLErrorDomain always return the error.localizedDescription in english ? 回答1: The answer to this question can be found in the project settings. You have to add the language you are interested in to your project Settings: Select the Project in the left navigate select the project (not the target) select the "Info" pane add the language to the "localization" section 回答2: Language is the first available in your project according to your languages order