ipad

UISplitViewController programmtically without nib/xib, thank you.

Hi, I usually create my projects without IB-stuff. The first thing I do is to strip off all references to xibs, outlets updated plist, etc and so forth. No problems, works great (in my world)! Now, I just installed 3.2 and tried to develop my first iPad app. Following same procedure as before, I created a UISplitView-based application ...

Open a pdf file in my iPad application with text search option

Hi, I am ipad Application developer.I am trying to open a pdf file in my application with text search option. Is there any possibility to load the pdf file within the application? ...

UIModalTransitionStylePartialCurl not rotating

I've got a modal view controller that is being displayed using UIModalPresentationFullScreen with the TransitionStyle set as UIModalTransitionStylePartialCurl. This works beautifully. My problem is that when the device is rotated, my view rotates (as intended), but the "curl" effect does not. Does anyone know if this is by design, o...

How do I run a universal app on the iPhone 3.1.3 simulator?

I'm working on a new app that I want to be universal for the iPhone and iPad. I started out with the "Create a Window-based app" wizard, and it created separate app delegates in "iPhone" and "iPad" groups. Since I already was quite familiar with iPhone dev, I did that part of my project, and now I'm ready to do some iPad stuff. So... I...

Moving UIButton around

I've tried to move a UIButton up and down in a menu. The problem I've got with the following solution is that the timer is not accurate. Sometimes the Button is moved up 122px, sometimes only 120px. How I can fix this? -(IBAction)marketTabClicked:(id)sender { if (marketTabExtended) { NSLog(@"marketTabExtended = YES"); ...

How to check if a BOOL is null?

Is there a way I can check to see if a value is NULL/Nil before assigning it to a BOOL? For example, I have a value in a NSDictionary that can be either TRUE/FALSE/NULL mySTUser.current_user_following = [[results objectForKey:@"current_user_following"]boolValue]; When the value is NULL I get the following error *** Terminating app ...

Objective-C x-code: Equivalent of __FILE__ and __LINE__ from C/C++?

Same question as: http://stackoverflow.com/questions/696218/do-line-file-equivalents-exist-in-c But for Objective-C in iPad/iPhone SDK Xcode? This would really help my NSLog statement be a lot more readable over time. ...

Action sheet doesn't show Cancel button on iPad

On the iphone, this code shows the cancel button: - (IBAction)buttonPressed { UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Are you sure?" delegate:self cancelButtonTitle:@"No way!" ...

iPad Custom Font

Hi, is there a way to load an own Font with the iPad SDK? I cannot find a useful example of what file-type the font has to be or how the LIB of the iPad is called. Can you provide further informations? Thank you ...

How can I revert my Universal app back to iPhone only?

In a silly mistake, I ran the "Upgrade current Target for iPad" assistant in Xcode. I'd like to target the iPad some time with my app, but right now, I don't have the time and just want to ship it. Is there an easy way to remove the iPad specific changes from my app? Specifically, what I'm after is, I want to be able to run the app in t...

Cocoa:Testing for the same object with ifs/switches

Ok so here's my code, it works great: - (void)textViewDidChange:(UITextView *)textView{ if (textView==someObject) { [detailItem setValue:textView.text forKey:@"someObjectAttribute"]; } The problem is that I have lots of textviews instances to test for and I would prefer to find some other way to consolidate the code. I was thinkin...

iPhone write to file (alternative directory)

New to iPhone 3.2, Apple introduced File-Sharing support. Details can be found at https://developer.apple.com/iphone/library/releasenotes/General/WhatsNewIniPhoneOS/Articles/iPhoneOS3_2.html#//apple_ref/doc/uid/TP40009337-SW1 . Now, most examples floating around in the web demonstrates writing to the documents directory. What if I wan...

Resize font size in UITextView

Is there a way to shrink the font-size in a UITextView if there is too much text? Similar to the UILabel? ...

How to HIDE the iPad keyboard from a MODAL view controller?

I'm trying to hide the iPad keyboard from a modal view controller but it doesn't work. I have tried resignFirstResponder but that doesn't have any affect if we are in a modal view controller. I tried resignFirstResponder in a non-modal UINavigationController with the very same UIViewController and the keyboard hides correctly. Does anyo...

Save image and scroll in interface builder?

How do I get Interface builder to save images on the screen, and add the ability to scroll? ...

does the accelerometer work for the iphone/ipad simulator?

From what I can tell, my app should be firing accelerometer events while Im using the iPad simulator in XCode, but its not. I have googled around and it somewhat seems that the accelerometer is not implemented in the simulator, is this correct? If so, why on earth would they have a "Hardware->Shake Gesture" menu option? My code is as f...

Placing arrow of uipopovercontroller at annotation point on mapkit

I am trying to get a popover to appear at a map kit annotation point but cannot find a "rect" in the annotation view properties to use the rect method of calling uipopovercontroller. If given an annotation on map kit how does one find the appropriate "frame"? To give paul more information, here is my attempt: I have already used: -...

UISplitViewController Cannot Change the Master View Controller?

I am trying to change the master view controller (that appears in the popover in portrait, and on the left side in landscape) in a UISplitViewController. I'd like to switch between the master view controller being one of two different UIViewControllers (depending on an action taken elsewhere in my application). I am using the following:...

Core Text tutorial

Hi, is there any nice CoreText tutorial for iPad out there? ... I found just few exampes in SDK documentation ... thanks ...

iPhone / Objective-C: NSMutableArray writeToFile won't write to file. Always returns NO

I'm trying to serialize two NSMutableArrays of NSObjects that implement the NSCoding protocol. However it works for one (stacks) and not the other (cards). I have the following block of code: -(void) saveCards { NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString* document...