iphone

iPhone CoreData Queries

Hey there, I'm new at using CoreData and I'm trying to understand how to perform a query on a table. I can use a fetch request to pull all of the records from a table, but I'm looking for a subset. Is there an easy way to do this? Thanks, Howie ...

How to edit a contact?

Is there any way to edit a contact programmatically in the iPhone? For example, I want to modify a contact which is returned by ABPeoplePickerNavigationController. How can I do this? I have: (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person { ...

UIView : frame size different of bounds size?

Hi guys. Is it possible to have an UIView with its bounds size different of its frame size? I'm trying to create an UIView with "{{0,0},{320,367}}" frame and "{{0,15},{320,337}}" bounds but i can't get it done using setBounds() and setFrame(). I got from the doc that changing bounds or frame changes frame or bounds accordingly but i t...

iPhone: assert just terminates the program

Hi all, I'm debugging a heavily assert()'ed iPhone app (Xcode, Objective C++, device simulator). In some cases, the assert failure would just terminate the app, instead of breaking into the debugger as I'd expect. I made a workaround by implementing my own kinda-assert to the effect of: #define AssertLite(b) if(!(b)) {asm {int 3}} (f...

How to save an image as Tiff or PNG with an alpha channel or alpha mask in iPhone SDK?

I have an image with something inside in a white backround. I want to save that image in a format that allows alpha channel or using an alpha mask in a way that the white pixels became transparents. Any light out there? ...

Alternative method for NSURLRequest's private "setAllowsAnyHTTPSCertificate:forHost:"?

My iPhone application was rejected solely for using the (very safe, it seems) private method +setAllowsAnyHTTPSCertificate:forHost: for NSURLRequest. Is there a non-private API to emulate this functionality? ...

How can I get the app store link to upgrade my app (iphone)?

I'm trying to prompt the user (once, I record it) to upgrade the iphone app if it is out of date. I've found a few sites that explain how to get the link to your app in the app store once it is already there. Here's one for example (http://bit.ly/6QIC40). The problem is, all these guides require the app to be in the store before you c...

Implementing Unit Testing on the iPhone

Hi, So I've followed this tutorial to setup unit testing on my app when I got a little stuck. At bullet point 8 in that tutorial it shows this image, which is what I should be expecting when I build: However this isn't what I get when I build. I get this error message: Command /bin/sh failed with exit code 1 as well as the error mes...

Will using an NSKeyedArchiver/NSCoder persist even after an application update?

Hi, I have NSKeyedArchiver and NSCoder data being persisted (as .txt files) and working great. When I deploy new builds to the iphone, the text files are still present - in other words, they are not being written over. However, I want to make sure that the text files will persist when an itunes delivered update of my application is m...

How to get a string from a UITextField?

How would I go about getting a string from a UITextField in the iPhone SDK? I'm trying to insert it into another concatenated string. ...

iPhone + Twitter API: Converting time?

Is there an easy way to convert the time stamp you get from twitter into unix time or minutes since now? I could parse through the string and convert everything myself but I'm hoping there is a way to convert that doesn't need that. Here is an example of a created_at element with a time stamp. Sun Mar 18 06:42:26 +0000 2007 ...

Change color of iPhone Slider control

Is there a way to change the color of a UISliderControl from blue to something else? ...

Change the minimum OS requirments of my iPhone App?

I made a simple application, then submitted for review. After that the app details claims that the minimum OS requirmentes is 3.1.2 (I work with that SDK). If I change my Target's iPhone OS Deployment Target to a lower iPhone OS, then could it be "fix" my problem? Is there any risk of it? I Use some UI(Image)Views, page-flip animations,...

How do I insert a POST request into a UIWebView

For a GET request I've tried this simple method: NSString *urlAddress = @"http://example.com/"; NSURL *url = [NSURL URLWithString:urlAddress]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [uiWebViewThingy loadRequest:request]; (Although it doesn't seem to work if the request contains high UTF-8 ch...

Deselect highlighted link when webView:shouldStartLoadWithRequest:navigationType: returns false

I'm displaying some HTML with links in a UIWebView. I want the links to open in Safari after the user confirmed that the link should really be opened. Opening the link works fine, but if the user cancels, the link remains selected and is highlighted in blue. How can I deselect the link and get rid of the highlighting? - (BOOL)webView:(...

Observing pinch multi-touch gestures in a UITableView

I am looking to implement a pinch in/out on top of a UITableView, I have looked at several methods including this one: Similar question But while I can create a "UIViewTouch" object and overlay it onto my UITableView, scroll events are not being relayed to my UITableView, I can still select cells, and they respond properly by trigg...

iPhone adding a UITabBar to TableView/NavigationController

hi guys, i have found lots of info about this topic but have yet to crack how it is actually done. I want to add a UITabBar in an iPhone app into an application already with a UIWindow / UINavigation Controller as the default Window. i.e. add a tab bar to a typical NavControl app with, RootViewController.xib, MainWindow.xib, AddView.x...

Swapping between UIViews in one UIViewController

I'm still finding my way around the iPhone SDK, I've followed some good tutorials but I am trying to find some simple solutions for the time being. Right now I want to knock up a simple app that will share the same UIViewController. I have created multiple views in Interface Builder and given them unique names in the Inspector (Identit...

How can I get files from the iDisk programmatically?

I need to write an iPhone app that allows the user to download and use files (more specifiably, video files) that are on the Mobile Me iDisk. Is this possible? I was not able to find an iDisk API for Objective-C. ...

While switching view on navigation bar, how to quit NSOpreationQueue thread safely without EXC_BAD_ACCESS error.

I am using an UITableView to show some string messages, and I use NSOperationQueue to hold an customized NSOperation which fetchs message in background thread. After one message fetched successfully, customized NSOperation will notify the UITableView controller to show it. If I click back button on the navigation bar to switch from the ...