iphone

How do I get the CoreData Debug argument to output to the console?

According to Apple documentation on debugging Core Data it says we should be able to pass an argument to the application which will output the SQL core data sends to SQLite. I have gone into the arguments tab of my executable in XCode and specified the argument: -com.apple.CoreData.SQLDebug 1 However, I see no SQL in the console. ...

Xcode error: Failed to launch simulated application

Problem statement: Unlike people have asked at here and here I got this error after a brand new installation of leopard(hackintosh), this problem really driving me crazy.... and nowhere else to find an clue, I googled and visited every article related with this, still cann't get it solved After the first time install iPhone SDK 2.2.1...

iPhone Memory Management and Releasing

Here's a common practice I see often (including from a very popular iPhone developer book) In the .h file: @interface SomeViewController : UIViewController { UIImageView *imgView; } Somewhere in the .m file: imgView = [[UIImageView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; [imgView setImage:[UIImage imageName...

Creating a "loading..." view using iPhone SDK...

How to create that black/gray modal popup kind of view that many apps use, when some long pending operation is in progress? Like when using location based services, loading a webpage, the screen goes dim and there is a modal view showing a spinning icon "Please wait..." I've posted a screenshot of what I mean here... http://www.flickr....

How to get IMEI on iPhone?

I want to get IMEI on iPhone. I try to use the following code: #import "Message/NetworkController.h" NetworkController *ntc=[[NetworkController sharedInstance] autorelease]; NSString *imeistring = [ntc IMEI]; But NetworkController is not found. I also find that I can get uniqueIdentifier using: UIDevice *myDevice = [UIDevice curr...

How to make the keyboard go away in the iphone simulator

I've got one text entry box in my iphone app, when you touch it in the simulator, the keyboard pops up. But there's no way to get rid of it. Other web pages give solutions, without explaining why they should work, and they don't work for me. One says make the text box's delegate your uiview then call resignfirstresponder on the object, b...

Best Application Delegate Practice

I have been making a few apps here and there, and I know my way around. What has always confused me is accessing global attributes, and where the best place to set them are. I have a few questions about accessing things and how to access them. Do you have to include your application delegates header file into any other other file you wa...

Changing modal UIView's orientation to landscape mode on iPhone

Hi All, Im having a modal view displayed on top of tab bar controller the orientation of tab bar controller and my modal view is currently in portrait mode, i need to only change my modal views orientation to landscape mode, i Tried usign UIDevice Orientation but no success it only works when .plist has UIDeviceOrientationKey, and i ...

How to increase the speed of the scroll in the table view when images are being loaded in each cell ?

Hi Guys... Check out the last lines before [return cell]..After the images are being loaded the scrolling speed is decreasing..it seems the scroll gets stuck - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *MyIdentifier = @"MyIdentifier"; UITableViewCell ...

When using drawRect for UIButton subclass...

When using drawRect for a UIButton subclass, I never seem to get called to draw the button when hiighlighted. Do I need to call setNeedsDisplay for my button in my touch events? ...

iPhone Application: Overall Application Hierarchy & Architecture

I have been struggling a little with my first real iPhone application and wanted to get some advice on how this should be structured. I am looking for some best practices in terms of creating UI components and linking them together to create the application flow (create views/controllers programmaticly vs. with Interface Builder, ect......

Compiling custom SQLite for an iPhone app

I'm trying to compile the SQLite amalgamation source into my iPhone app (to give me access to the full-text searching functionality that isn't available in the iPhone-compiled version of the binary. When I add sqlite3.c and sqlite3.h to a normal Carbon C app template, it compiles just fine (with a single warning about an unused variabl...

iPhone Can't deselect a UITableViewCell

I have a RootViewController class which is inherited from UITableViewController. When a cell is deselected by the user I want to enable/disable certain buttons on the toolbar. How do I trap the deselect event? -(void)tableView:(UITableView *)tableView deselectRowAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated { if(index...

iPhone GPS Performance

I'm writing an iPhone App that relies on getting the device location. Management have tasked me with producing data on how well the GPS performs in cities (tall buildings) and within buildings. Do any developers have data on reliability of GPS and the fall back to cell/wifi tower triangulation? Management-friendly info would be best bu...

Do I always have to call [super viewDidLoad] in the -viewDidLoad method?

In Apple's scrollView example they don't call that. I always thought that's a must. Why should I call that anyways? ...

iPhone TableView above a TextView: TableView doesn't respond to events

Hi all, Consider a regular form in iPhone: 1.There is a combobox. 2.There is a TextView under the combobox. (No overlaps) 3.When combobox is clicked,the options TableView opens and overlaps with the TextView. 4.The TableView is on top of the TextView. 5.When a cell in the TableView is touched, the TextView responds, the TableView ...

How can I iterate over image resources inside one group?

In my "Groups & Files" I have created something like that: images > gui images > foo images > foo > bar now I want to iterate over all images that are placed in images > foo > bar. Is that possible? I am afraid it's not, because the system did never care much about "folders" when loading a file. ...

iPhone - Blank Screen when Switching VIews

I have an application that makes use of drill-down views, tabbars, etc. I'm also making use of the UIImagePicker, as well as Route-Me for mapping support. Normally, the application performs fine. However, I find that if I perform a lot of activities and then switch between views, I end up with a blank screen and my view is not drawn. ...

How to disable the edit button that appears in the more section of a UITabBarController?

In my application (based on the Tab bar application XCode template) I use a UITabBarController to display a list of different sections of the application that the user can access. By default, the UITabBarController displays a 'More' button in the tab bar when there are more than 5 items. Also, it allows the user to select the items that...

NSURLConnection - how to wait for completion

Our iPhone app code currently uses NSURLConnection sendSynchronousRequest and that works fine except we need more visibility into the connection progress and caching so we're moving to an async NSURLConnection. What's the simplest way to wait for the async code to complete? Wrap it in a NSOperation/NSOperationQueue, performSelector..., ...