iphone-sdk-3.0

iPhone development: what will [[UIDevice currentDevice] model] return for “iPad”? [closed]

ε祈祈猫儿з 提交于 2019-12-09 13:54:15
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . What will [[UIDevice currentDevice] model] return for "iPad"? 回答1: You can use UI_USER_INTERFACE_IDIOM() , which will either return UIUserInterfaceIdiomPhone or UIUserInterfaceIdiomPad . Bear in mind that on any device < 3.2, this is unavailable, so first check to see whether the property can be retrieved - in

UIScrollView shifts below navigation and status bar

北慕城南 提交于 2019-12-09 13:37:23
问题 I have view which contains a scrollView. When the view shows up the image appears in full screen (320x480) hiding the status and navigation bar. When I tap the screens - status and navigation bar appears on the screen. But this thing shifts the UIScrollView below the the navigation bar. I want the status and nav bar to show over my scroll view. Like it happens in the photos app. On tapping the image the status and nav bar shows over the scrollView. Below is how I am positioning the view /

how to Insert , overwrite audio files -Audio Editing iphone

佐手、 提交于 2019-12-09 12:21:41
问题 I am developing an application which does audio recording. Now I need to add a feature of editing the recorded audio file... The user should be able to play the audio file & insert recording into that.. cut unwanted audio .. I need the two basic functionality INSERT audio & overwrite existing audio. Is there any inbuilt function? Any useful link related to this will be helpful 来源: https://stackoverflow.com/questions/1584035/how-to-insert-overwrite-audio-files-audio-editing-iphone

Copy and Paste on iPhone with multiple data representations

♀尐吖头ヾ 提交于 2019-12-09 09:29:06
问题 I encountered some issues when trying to put more than one data representation onto the pasteboard on iPhone 3.0. What I'm trying to do is put a data representation and a string representation onto the pasteboard. The data is my own data type and I use it for copy and paste in my application. The string representation is a way to copy and paste the content of my application as an outline into an other application (for example Mail.app). // payload NSString *pasteboardString = [selectedNode

UITableView and a UITextField that is always visible

为君一笑 提交于 2019-12-09 04:26:30
I want to create an application which combines a chat feature. My question is this: how can I have a UITextField that is always visible in the same view as a UITableView? The obvious solution would be to create my own UIView having a UITableView and a UITextField below it, however the UITableViewController doesn't seem to like me doing that as it expects the connected "view" outlet to be a UITableView, essentially destroying my plans. Anyone with an idea? Don't use UITableViewController. After all, it's just a standard controller with a full-screen UITableView. You can roll your own easily.

Tab bar Controller raising NSInternalInconsistencyException

无人久伴 提交于 2019-12-09 01:48:57
问题 In my SDK 3.0 core data based app, I have a tab bar controller managing 4 tabs. From time to time, apparently randomly, when I launch the app, it crashes with the following message: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Directly modifying a tab bar managed by a tab bar controller is not allowed.' However, I am not modifying in my code any of the tabs except for the following. In practice, all of the navigation controllers or controllers in the

Switch between 3 or more views

故事扮演 提交于 2019-12-08 19:06:26
Im new to iPhone development and I have really taken this to me. I love it, but there is one thing thats naggin' me. How do I keep switching view? I know how to come from first view that is given to me when I create a new project, to a view that I make, but how do I get passed this two windows? How do I get from to views that I created? I have this app which have a main window with a NavigationController whih is feed with a UITableViewController. This is my main menu. I have a in the upper right corner, a "+"-button which gives me a new view, but how do I get a new view from here? How do I

NSMapTable missing from 3.0 headers?

戏子无情 提交于 2019-12-08 13:38:58
问题 I'm using NSMapTable in a program that must run under both 3.0 and 2.2.1. As expected, the program compiles without problems for the 2.2.1 libraries, but when I switch to 3.0, I get compiler errors: error: expected specifier-qualifier-list before 'NSMapTable' In other words, XCode can't find the declaration of the NSMapTable class. I had to put in a forward declaration (@class NSMapTable) in my own header and #import <Foundation/NSMapTable.h> in my implementation file in order to be able to

resignFirstResponder only occurs after processing is complete

对着背影说爱祢 提交于 2019-12-08 13:24:17
问题 I want the keyboard to go away as soon as I hit "submit" in my iphone app, and not wait until the function completes. The function takes a long time because I'm doing a synchronous HTTP request. How come the view doesn't update until the whole function completes? I'm working in the simulator in xcode. -(IBAction)submit:(id)sender{ [myTitle resignFirstResponder]; ...some ASIHTTP setup... [request startSynchronous]; return; } 回答1: If you want to keep your current synchronous HTTP request then

How would I drag UITextView around the view screen?

陌路散爱 提交于 2019-12-08 13:16:54
问题 I have a project where a UITextView (for multilines) can be dragged around the screen. So far my solution to this has been an overlay of an invisible UIButton which when dragged its center is the same as the UITextView's center. However I've seen apps that seem to just allow the UITextView to be dragged and edited on the fly so it seems there might not be an overlay in those but I'm not sure. Thoughts? By the way, c in this code is the UIButton and this is how I have moved it thus far: -