iphone

NSPredicate that references multiple fields on a to-many relationship?

I'm using a SQLite persistent store. I have a NSManagedObject class Den with a to-many relationship Bear. Bear has several fields: Bear: breed color age ... When I am building fetch requests for my Foo objects, I can filter to objects that have a related Bear with a certain field value: NSPredicate *hasGrizzlyPred =...

Apple SDK bug? View controller stack change during orientation rotation

Hello there, I have several view controllers which will be push to (pop from) a same UINavigationController. The problem is that if I navigation those view controller during orientation rotation, the frame of controller's view is not correct. For example, in portrait mode if I click on back button, then rotate to landscape immediately...

Progress bar on iPhone using UIImages

I'm designing a progress bar for an app that essentially is two UIImages - both are the exact same size (long rectangles with rounded corners), except they are colored differently. The bottom bar is black and the progress bar that will fill over it is grey. Displaying the bottom bar is easy enough. The issue I'm trying to figure out is...

Any tutorials on building an iAd?

I am looking to build an iAd for a client. It shouldn't be to hard, but I would like to see a decent sample. I was looking through the iOS library but didn't find anything. Can anyone point me to a tutorial? ...

UIImage has unwanted gradient when stretched in a UISlider

I have created a two 7x30 image, one with a 3 pixel black border and a transparent middle, the other with a white middle (min.png and max.png). I am using these two images as the Track Images for a UISlider like this: [self.progressBar setMinimumTrackImage:[[UIImage imageNamed:@"min"] stretchableImageWithLeftCapWidth:3 topCapHeight:3] ...

UINavigationBar Disappears using UISearchBar and SearchDisplayController

Here is my scenario: (1) I have a TabBarController with the following: (A) Navigation Controller (rootviewcontroller is a uitableviewcontroller) = Tab 0 (B) UIViewController = Tab 1 (2) The Navigation Controller is using a UISearchBar along with UISearchDisplayController (3) I click into and enter a search into the...

NSMutableArray 'addObject:' Crashing iPhone App

This is my error: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI addObject:]: unrecognized selector sent to instance I have no idea why this is happening. Both the array (which is NSMutableArray) and the object being added are definitely not nil, and the @property for the array is straig...

Default User Settings in iOS4

I have a Settings.bundle and default settings in it. I try to read it: NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults synchronize]; NSString *fontSize = [defaults objectForKey:@"fontSize"]; but it always null If I don’t run the Settings application before my application runs for the first time. How...

How to acheive 2 dimensional scrolling on iPhone

Hey Folks, I am trying to create a excel like view in my app. To do that I wanted to achieve both horizontal n vertical swipes at the same time .i.e., if the vertical scroll would fill with rows and the horizontal with columns.. have no clue hw to begin with. Any help would be greatly appreciated... ...

Switching page content in iphone UIWebview html5

I'm building an iphone app. I have multiple "pages/sections" of content, and I'd like to see what you all thought was the best way to swap the content out. I'm using jquery. This doesn't look like a typical iphone app, and so I'm not using jqtouch. Currently, I have a container div and I use the jquery load method to load in the di...

CJSONDeserializer deserializer

Hi.. I hve code like this: NSDictionary * dict = [[CJSONDeserializer deserializer] deserializeAsDictionary:jsonData error:&error]; i hve 2 php calling method coding is same for both. it retrieves for 1st php where as 2nd is dict 0 pair key/value , also it shows jsonstring in console. i dont know why dict is null,may be CJSONDeserialize...

cellForRowAtIndexPath:(NSIndexPath *)indexPath method is not called after calling the numberOfRowsInSection method

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath method is not called after calling the delegate method (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section ...

How can remove the gradient from the toolbar?

I have given a black background for the UIView and it have a toolbar on it.I gave black background for the toolbar too. There are buttons on the toolbar. I want them to appear like they are on the page itself. But even after giving black color, the toolbar is kinda projecting itself. How can I make the buttons on the toolbar appear lik...

How to remove a directory and its contents using NSFileManager

Hi, New to Objective C. I have created a few directories which contain pdf files for an iPhone app. How can I delete a directory and its contents using NSFileManager? Do I need to loop through and remove the contents first? Any code samples would be much appreciated. Thanks in advance. ...

Custom "Done" button in Utility Application

Trying to get custom "Done" button in Utility Application Create new project in Xcode using Utility template Put image done_button.png in project Add some code in FlipsideViewController.m in viewDidLoad method. I use this code successfully when change buttons in navigation controllers. UIImage *back_image=[UIImage imageNamed:@"...

Navigation control for iphone

hi I wanna implement a naviagtion control for a series of view. For example, naviagting from 1st view to 2nd view, then from 2nd view to 3rd view.......Can anybody give good tutorial for implementing this. Regards, Sreelash ...

UIview hittest problem?

I am using in one parentview - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event to findout hit when the user touches the view.it works fine.it returns childview correctly.I move those views in the parent view.but I added UIGestureRecogniser to the subview for dragging inside subview .but when i drag inside the subview , it tak...

iphone: Making pointer to UITableViewCell crashing app?

I have a UITableView with about 20 cells. I wanted to make a pointer to three of those cells, so I set up a property for those, then pointed them to those cells: if ([item.title isEqualToString:@"Test1"]) { test1 = cell; } else if ([item.title isEqualToString:@"test2"]) { test2 = cell; } If I scroll up and down in my table view o...

mail could not send through iphone sdk?

i want to send mail through iphone sdk i know there are lots of answers here on stack overflow but it does not work ,i downloaded the mail composer app from apple site and ran in my simulator ,it displaye that mail has been sent but i dont get it on my email address ...

how update one xib label from another class

Hi all, I want that update in player controller song duration of song(which is downloaded from the server) from the playlist controller. Actually i m using avaudioplayer so in player i have two controller avtouchcontroller and avtouchview controller,and one xib of avtouchviewcontroller where all things (play pause next prev song durati...