cocoa-touch

adding a View when project started from "Window-based Application"

Hi all, i have some trivial question that is bothering me. When i create a new project using "Window-based Application" eg. for iPhone i have its app delegate declared, then for example i want to create one additional UIViewController/nib pair and add it to the main window view as kinda of "entering point view" - i'm trying to avoid to e...

How to get the sender's name of an NSButton

I have several NSButtons that are attached to a single IBAction. I need to differentiate inside the method between the different buttons. I tried the following, but it doesn't work: for (int i = 0; i++; i < 7) { if (sender == [NSString stringWithFormat:@"button%i", i+1]) { NSLog(@"sender is button %i", i+1); } } H...

Filter Companies from Address Book References

Using the 'AddressBook.framework' is it possible to filter out all companies (i.e. just people). For example, how would one modify the following code to remove companies: ABAddressBookRef addressbook = ABAddressBookCreate(); CFArrayRef contacts = ABAddressBookCopyArrayOfAllPeople(addressbook); I found that companies do not appear to b...

How to change the value of an NSMutableArray at a particular index

[array objectAtIndex:i] doesn't work as an L value, so it can't be used to set the object at index i. ...

Universal iOS app crashing on iPhone/iTouch 3.1.3 due to UIPopoverController

I just updated my app so that it's a universal app. In doing so I added support for UIPopoverController in a certain place. Now the app seems to be crashing on 3.1.3 iPhone/iTouch devices: OS Version: iPhone OS 3.1.3 (7E18) Report Version: 104 Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x00000001, 0xe7ffdefe Crash...

UINavigationBar root view doesn't rotate into landscape.

I have an application with a main menu screen consisting of a few buttons on link to other view controllers using a navigation bar which are consist of web views. In each of my view controllers including the root I have the following method to auto-rotate: (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)x { retur...

Is it possible to add attendees in EKEvent (in iPhone Native calendar app)

Does any one know how to add contact( attendees and organizer property) name in EKEvent(native calendar application). Thanks. ...

Parsing 64-bit unsigned integer on iOS.

I have very big unsigned integral number in NSString. This may be big to 2^64. Is there an existing functions/classes parsing this? As I know, it's unsigned long long value, but, It's hard to know what kind of method should I use to parse this. ...

Chanign color of UITableViewCellAccessoryCheckmark and UITextField

Hi, I want to change the color of UITableViewCellAccessoryCheckmark and UITextField background color where we type. I found this is not straight forward. Please help me. Thank you. ...

CGContextDrawPDFPage leaking in iPhone 4 but not in iPad

I'm porting my iPad app to iPhone. Using the same code, CGContextDrawPDFPage is registering leaks in Instruments when running in iPhone, but not when running in iPad. I find this really disappointing because http://www.openradar.appspot.com/radar?id=126402 says CGContextDrawPDFPage leaks should already be fixed. Does anyone know the re...

Increasing thr UIPageControl Size in iOS

Hi I want to incease the size of UIPAgeControl on iOS... on google i've found this http://www.onidev.com/2009/12/02/customisable-uipagecontrol/ was wondering is there any other way....? ...

Setting UINavigationController, old code?

I have been looking back at some old code from when I first started learning Objective-c and I have a quick question: // THIS IS MY OLD CODE @implementation syntax_UINavAppDelegate @synthesize window; @synthesize navController; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {...

How do I popViewControllerAnimated after a delay?

I have a UITableViewController that is presented with a list of choices. After the user taps one, I'd like to return to the previous view. The return seems too quick with the code I'm using though. I'd like to pause for 0.2 seconds or so to give the user time to see their selection become checked. Here's the code I'm using now: - (void)...

game in an iphone: where to start

Hello, I'd like to develop a 2d game that's not gonna be very intensive with an iphone sdk. I don't want to use opengl and i don't want to use ano 3rd party things. So as i understand, i'll have to use a view's drawrect method to draw things. I've spent hours researching this topic and as always with apple's production - it just left me...

cocoa UIImageView addTarget with extra parameter

With a loop I add UIImageView to a UIScrollView i need to add an extra parameter addTarget so when i click i can log the index. [imageButton addTarget:self action:@selector(buttonPushed:) forControlEvents:UIControlEventTouchUpInside]; -(IBaction) buttonPushed: (int) index { NSLog(@"%d",index); } How do i achieve this? ...

UISearchBar No Background Landscape Mode

I have the following snippet to remove the background from a UISearchBar: for (UIView *subview in self.searchDisplayController.searchBar.subviews) { if ([subview isKindOfClass:NSClassFromString(@"UISearchBarBackground")]) { [subview removeFromSuperview]; break; } } However, if the device is rotated to lan...

CGPDFDocumentCreateWithProvider() and CGPDFDocumentCreateWithURL() used on a local file

Most, if not all, tutorials use CGPDFDocumentCreateWithURL(). What is the difference if using CGPDFDocumentCreateWithProvider() instead? Let's say the pdf is being taken from a local file on the device, not downloaded from some website. Will there be a performance difference? Which is better? ...

Application Delegate Error while integrating Calendar control into my app.

Hi, In my app i need calendar control so i have found out a calendar suitable for my app on the link below: http://blog.webscale.co.in/?p=244 Now i want to integrate that in my project so i am referencing the project into my app but it leads to a crash and console shows exception that unknown CalendarAppDelegate. What should I do? ...

Update back button in navigationbar

if i change the title of the parentViewController, how do i update the back button displayed in the upper left corner of the child view. ? i already know to set self.title when i am actually displaying the parent view, but i would like to know how to refresh the button with the new title displayed in the child view while i am looking at...

Cocoa Touch retain object returned from NSUserDefaults?

I have a NSArray object retrieved from the standard user defaults object, [NSUSerDefaults standardUserDefaults]. I want to save this array as a member variable of another object and use it for the lifetime of this object. I'm not sure if the array from NSUserDefaults is an autorelease object. Should I retain the array? ...