iphone-sdk-3.1

GameKit wifi connection?

北城以北 提交于 2019-11-30 14:01:57
问题 I've read that as of iPhone OS 3.1, GameKit supports wifi connections. But the documentation states: "If your application configures the peer picker to allow Internet connections, your application must also dismiss the peer picker and present its own interface to configure an internet connection." Does this still stand? If so, how do I establish a wifi Bonjour session that can be used by GK? (I'm only interested in using the local network.) 回答1: Your GKSession object will automatically handle

GameKit wifi connection?

北城以北 提交于 2019-11-30 09:31:19
I've read that as of iPhone OS 3.1, GameKit supports wifi connections. But the documentation states: "If your application configures the peer picker to allow Internet connections, your application must also dismiss the peer picker and present its own interface to configure an internet connection." Does this still stand? If so, how do I establish a wifi Bonjour session that can be used by GK? (I'm only interested in using the local network.) Your GKSession object will automatically handle the discovery of peers over WiFi or Bluetooth, and find those that are available on either protocol. The

UITextView selectedRange not displaying when set programmatically

爱⌒轻易说出口 提交于 2019-11-30 05:01:36
My problem is that programmatically setting the selectedRange of UITextView selects the text, but does not visually indicate it's selected. Does this sound like a bug in OS 3.0/3.1. More importantly, any solution or suggestions for getting the selection to display? (sample project linked at bottom of message) How do I know it's selected since I'm not getting visual feedback? Two reasons: No blinking cursor Tapping any key on keyboard deletes existing text in the selection range. I have a UITextView in a viewcontroller which allows editing a user-changeable value. The editor controller is

Finding the distance, currency, temperature units etc. for a country (iPhone)

左心房为你撑大大i 提交于 2019-11-30 04:42:06
During the localization of my app I went through a lot of documentation, somewhere Im sure I read that there is a way to get a set of units that is linked with the locale. I believe it said something like "units based on cultural..." something. I would like to display temperature and distance in Fahrenheit and Miles for some countries and Celsius and Kilometers for other countries. Is there a way to access a list of these units in the iPhone SDK. Thanks you. You can use NSLocale to check the currency unit, but for imperial vs. metric you need to make a list yourself . Oops. You can check for

Picking video from PhotoLibrary with UIImagePickerController in OS 3.1

家住魔仙堡 提交于 2019-11-29 08:39:18
I am trying to pick a video from the photo library. In principle I know how to do it you set the mediaType of the image picker to an NSArray with kUTTypeMovie as its only object. But this doesn't seem to work on an iPhone 3G. Since OS 3.1 you can store videos you've received in your photo library. When you start the build in 'Photos' application the videos appear. However this doesn't work using the UIImagePickerController. The controller reports that it only supports images. When you try to set the mediaType of the controller with kUTTypeMovie it actually crashes. If you don't specify the

UITextView selectedRange not displaying when set programmatically

二次信任 提交于 2019-11-29 02:41:55
问题 My problem is that programmatically setting the selectedRange of UITextView selects the text, but does not visually indicate it's selected. Does this sound like a bug in OS 3.0/3.1. More importantly, any solution or suggestions for getting the selection to display? (sample project linked at bottom of message) How do I know it's selected since I'm not getting visual feedback? Two reasons: No blinking cursor Tapping any key on keyboard deletes existing text in the selection range. I have a

UIImageWriteToSavedPhotosAlbum working… sometimes

南笙酒味 提交于 2019-11-29 00:41:19
UIImageWriteToSavedPhotosAlbum is only working sometimes. Sometimes it works, sometimes it doesn't, exact same function. - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo { NSLog(@"Saving image to camera roll..."); UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil); NSLog(@"Done!"); } I am using a UIImagePicker controller to get the image that then calls that function. Sometimes it saves it to the camera roll, other times it simply doesn't. Anyone has any idea? Thanks in advance. Edit: The completion

Black corners on UITableView Group Style

被刻印的时光 ゝ 提交于 2019-11-29 00:07:06
问题 I have a problem where my UITableView (group style) has a black "tip" above it's rounded corner. I'm setting up the background of the tableview like so: [meetingTableView setBackgroundColor:[[UIColor alloc] initWithPatternImage:[[UIImage alloc] initWithContentsOfFile:@"background.png"]]]; And my table view ends up looking like this: black pointy edge on rounded corner http://papernapkin.org/pastebin/resource/images/imageEntryId/6487 Any ideas how I can get rid of those black points? 回答1: I

Symbol not found: _OBJC_CLASS_$_UIPopoverController

亡梦爱人 提交于 2019-11-28 18:50:32
I am having problems with my universal app. I have set the Base SDK to iPhone 3.2 and set the target to 3.1. I have moved the files that are using the UIPopoverController to their own files and they shouldn't be loaded when loading the app on the iPhone. Still, when I build my app I get the following error when I build and debug to my device: dyld: Symbol not found: _OBJC_CLASS_$_UIPopoverController Referenced from: /var/mobile/Applications/B3B90643-92DC-4E5C-8B2F-83A42D6D57E0/citybikes.app/citybikes Expected in: /System/Library/Frameworks/UIKit.framework/UIKit in /var/mobile/Applications

iPhone - How do you make a resizable rectangle for cropping images?

陌路散爱 提交于 2019-11-28 07:51:59
I'm having a trouble making a re-sizable rectangle for cropping my images. I'm trying to achieve something like this picture: http://img192.imageshack.us/img192/8930/customcropbox.jpg Well, the only problem is I have no clue where to actually start. I need some advice to how I can achieve this effect of cropping. What documentation should I read up on? Core Graphics or Quartz 2d? Both? I've been coding for the iPhone since it's release date but I've never actually used core graphics and etc. Any help or advice would be much appreciated. I'll throw my code up here as I progress to show how it's