Building Two iPhone Apps from Common Code
I have an iPhone app, and I'm taking a few features of the app and creating a new app. What's the appropriate way to build two apps from a common code base? ...
I have an iPhone app, and I'm taking a few features of the app and creating a new app. What's the appropriate way to build two apps from a common code base? ...
Hi to all! I dropped 2 days on this problem and can't come out with a solution so: (I know this wont have much sense but hopefully it will do the trick) monkey.h @interface monkey : NSObject { NSNumber *monkeyRanch; } @property (nonatomic, retain) NSNumber *monkeyRanch; -(id) gatherTheMonkeys:(int)howmany; monkey.m @synthesize monk...
Using this method to hide the status bar: [[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES]; When setting "hidden" back to NO, the tap-to-scroll-to-top (in UIWebView, UITableView, whatever) doesn't work any more, and requires a restart of the app to get the functionality back. Is this a bug (I filed a rdar anyho...
I have a UIImageView object created in IB, and has an outlet. I want to move it, but only change the y value, so I have: CGFloat x, w, h; x = image.frame.origin.x; w = image.frame.size.width; h = image.frame.size.height; image.frame = CGRectMake(x, /*formula to figure out new y value*/, w, h); When this runs, the image simply disappea...
I'm working on an iPhone app with a search function, where writing search terms in a UISearchBar changes (filters) the output of the UITabelView below. When user is editing the content of the search bar and deletes all of the text, the following code is executed in - (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)se...
I am toying with the idea of creating a iPhone UI editor that isn't Interface Builder! Mostly to see if it is possible to do... I have been able to link to the UIKit.framework in a Cocoa app that I have created by dynamically loading it (via NSBundle functionality). I have been able to instantiate an UIView from there. Now the question i...
I had upgraded my OS into Snow Leopard, and I'm using Xcode 3.2 with iPhone SDK 3.0 for Snow Leopard. I had cleaned up the existing Developer Tools, uninstall, and I deleted the /Developer directory, and I reinstall. But, the problem is, Interface Builder is showing 3 pop up alerts with this message: Assertion Message: Interface Build...
I use CoreData to store image data that user took from iPhone's Camera. Over time, the memory consumed by these objects keep increasing, but I don't know how to clear those objects from the memory. How should this be done? ...
I'm trying to update the username field for a textfield. Currently there is a place holder which has "Username" written in it. I am loading the username from a settings file but for clarity I will just hardcode in the username. - (void)viewDidLoad { settings=[Settings new]; [settings loadData]; //username.text=settings.use...
I've made a UIImageView with the correct size in the interface builder and connected the outlet up in the class file. How can I stop a large jpg from filling the entire screen? I want the image to resize to fit in the frame I made in IB. (void)viewDidLoad { NSString filePath = [[NSBundle mainBundle] pathForResource:@"wine" ofType:@"jpg...
I am building a UITableViewCell. I am using the style UITableViewCellStyleSubtitle for my table view cell. In the textLabel of the cell I have data that can require a wrap. So to accomodate, I want to move down the detailTextLabel so that the wrapped text isn't covered by the text in the detailTextLabel. I am attempting the following...
What is the advantage of doing this: NSArray *array = [[NSArray alloc] initWithObjects:@"Year", "@Capital", ..., nil]; self.hintArray = array; [array release]; Instead of assigning directly to my class variable like this: self.hintArray = [[NSArray alloc] initWithObjects:@"Year", "@Capital", ..., nil]; Why do we create a temporary ...
I have created a flexible navigation bar in my app that will show custom buttons on the left, right, and in the middle. So far I have got working: Right/Left/Middle - Custom Image and/or Text Right/Left - Normal looking button with custom Image in it Right/Left - Normal looking button with custom Text in it By 'normal looking' I mea...
This is pretty much the same problem i have, except with very different code: http://www.cocoabuilder.com/archive/message/cocoa/2009/3/24/233015 I want to offload some processing to an NSOperation, passing a filename as a reference that the NSOperation loads and parses. The app crashes with EXEC_BAD_ACCESS when entering -(void)init. He...
In the iPhone 3.0 SDK, how can I be informed when a zoomToRect:animated: animation completes? Sometimes the scrollview doesn't zoom at all (if it's already at the proper zoom level), and there doesn't seem to be a way to detect that. ...
Hello, I'm attempting to test a Store Kit transaction with the iPhone 3.0 SDK. I am basing my code off the sample code in the Store Kit Programming Guide, but I keep getting failed transactions (status: SKPaymentTransactionStateFailed). However, the transaction's error property is nil, so that doesn't shed any light on the situation. ...
I've got an CGFloat but need it as an NSInteger. The float value is like 2.0f, so I don't mind about fractional parts and loosing precision. What's a legal way to convert it into NSInteger without trouble (except the loss of precision, of course)? NSInteger niceInt = niceCGFloat; seems too simple, smells buggy. Maybe you can explain? ...
I have an iphone application which has about 4 tabs. How do I force the program to start on the second tab? Currently I have switched the first and second tab, but the aesthetics are horrid. ...
I have an iphone app using a uitableview where I'd like the "reorder" controls to always be displayed, and have the user swipe to delete rows. The approach I'm currently taking is to put the tableview in edit mode and allow selection in edit mode self.tableView.editing = YES; self.tableView.allowsSelectionDuringEditing = YES; I then ...
I get this cryptic error the first time (and only the first time) my view is loaded due to the following line of code: - (void)viewWillAppear:(BOOL)animated { [textField becomeFirstResponder]; } There is a noticeable (~3 – 4 second, even on the simulator) delay due to this that makes my app feel unresponsive. Does anyone know how ...