cocoa-touch

NSFetchRequests returns 0 results when it should return 1

Hi, I am trying to perform a fetch on core data after i insert an entity, and I get 0 results. I have a Person Entity.And i built a fetch Request in the DataModule GUI with the predicate: name == "PERSONNAME" Just before searching for the name i insert and save it first. and i know that works because i display the names in a table...

iPhone - UIWebView Gestures

I have viewcontrollers set up to track gestures and commit an action, in this case, change the tab. The code for the viewcontrollers is as follows: #define HORIZ_SWIPE_DRAG_MIN 100 CGPoint mystartTouchPosition; BOOL isProcessingListMove; - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches any...

UIScrollView and CALayers

I have a custom UIView that is composed entirely of CALayers. In the awakeFromNib method it creates and sets all the CALayers into their appropriate positions (CAGradientLayer, several CATextLayers, and a few custom CALayer subclasses). The custom UIView does not override the drawRect: method because there's no drawing done directly int...

How to add a button to the right hand side of a UITableView entry?

I am working on an in app purchase app. I would like fill a table view with a list of products, and put a BUY button on the right hand side of each entry. Does anyone have the UITableView - fu necessary to do this? Thanks! ...

Is there any way to access iPhone mail app mailboxes inside my own iphone app?

Hi Everyone, I wonder if there's any way to loop inside a mailbox and get the list of messages inside the mailbox. I want to open each message and take screen shot of the email. Is there any way to do this? Any reference? Thanks for your help. ...

How can I disable a button while NSXMLParser runs, then enable it when it completes?

I have a viewController which imports XMLParser.h as the class xmlParser I'm passing an NSURL object in my viewController to the xmlParser class with the getXML method below goButton is the button I tap to call the getXML method below. I disable the button which I tapped to trigger the getXML method, but I'm not sure where to put the ...

[iphone] How to prevent subview from overlapping tab bar?

Hi, I have a view with tab bar at the bottom. This view is pushed on a navigation controller, so there is also a navigation bar at the top. Unto this view, I would like to show a table view, which I create from its own nib. When I add this view as a subview, it overlaps the tab bar. Is there a way to make this subview automatically re...

What's wrong with this Objective-C threading code for my iPhone app?

This piece of code: - (IBAction) getXML { goButton.enabled = NO; [self performSelectorInBackground:@selector(parseInBackground) withObject:nil]; } - (void)parseInBackground { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; xmlParser = [[XMLParser alloc] init]; NSURL *xmlurl = [[NSURL alloc] initWithStrin...

iPhone Data Best Practices - caching vs remote

I'm developing an iPhone app that uses a user account and a web API to get results (json) from a website. The results are a list of user's events. Just looking for some advice or strategies - when to cache and when to make an api call... and if the iPhone SDK has anything built in to handle these scenarios. When I get the results from ...

How do I add an outer glow to a UIImage or UIImageView or UIView

I want to add a FADED shadow/outer glow to a UIImage/UIImageView/UIView but I know no Core Graphics at all. Edit: Please Help!! ...

Callback for camera shutter open event

Hi all, I have been working around in UIImagePickerController and am struck with a problem where I need to get the precise moment when the camera shutter opens in UIImagePickerController when the source type is set to camera (UIImagePickerControllerSourceTypeCamera). I have done some googling around and have realized that no one had su...

SQLite in iPhone:I want to Retrieving 1 row for each date from sqlite

i only want to know that whether data is available for any specific date or not.If there are more than one data with the same date, i do not want to fetch all the data.I try to use LIMIT 0,1 in where clause but it means it will fetch total 1 data for the given date range. So please tell me the way to fetch data between a date range with...

Change font size of UISegmentedControl

Can anyone please tell me how can I change the font type and size of UISegmentedControl? Thanks, Aashutosh ...

UIImageView Animation Stopping in UITableView

I have a UIImageView inside of a UITableViewCell. The UIImageView animates. For some odd reason, when the cell goes out of view, the animation stops. The UIImageView is never initialized again and the UIImageView is never explicitly told to - (void)stopAnimating; so I'm not sure why it's stopping. Here's the interesting parts of my cell...

How to search MKMapView with UISearchBar ?

I have an application that needs to have a similar search feature like the Apple "Maps" application (included with iPhone/iPod Touch). The feature in question should not be a hard thing to do, but I'm really clueless about how to input a Street Address in the search bar, and then obtaining coordinates for that address or something that ...

Animation issue when hiding iPhone toolbar

I have a toolbar in my RootViewController and I then hide the toolbar in a SubViewController using the following code: RootViewController - (void)viewDidLoad { ... [self.navigationController setToolbarHidden:FALSE animated:FALSE]; ... } - (void)viewDidAppear:(BOOL)animated { [self.navigationController setToolbarHidde...

How to dismiss a modal view as soon as it's displayed (without user interaction)

Hello everybody, I apologize if my question may result trivial or obscure. I am using a view presented modally. In order to achieve a little 'scenographic' animation effect, based on the value of a parameter, I wish to reach the following behavior: If value is 0, the view presented modally stays on display and allows user actions until ...

How can I keep multiple NSManagedContext's in sync?

I've spent a couple of hours tonight trying to create a setup whereby I have three managed object contexts - one attached to my application's delegate, one in an NSObject subclass responsible for UITableView updates (via an NSFetchedResultsController) and one in an NSOperation subclass. I can get the changes from the NSOperation subclas...

Overriding properties of child view controller vs setting them via parent view controller

If you want to modify the default behaviour of a View Controller by changing the value of one of its properties, is it considered better form to instantiate the class and set its property directly, or subclass it and override the property? With the former it would become the parent View Controller's responsibility to configure its ch...

Accessing Page From App?

I am only just starting out with iPhone application development and have been doing some research with regards at getting data into an app using information available via the web. I understand that I can access web pages using the NSURL* classes. Does anyone know how I might request data from a page that requires user input? I can und...