iphone

How to mask a UIImage so that white becomes transparent on iphone?

Hi All, I have a UIImage (generated by a user drawing) that has a white background. I'd like to make the white portions of this image transparent. I'd also like to save this to a PNG file. I've looked around on forums but can't figure out how to mask the image correctly. Has anyone tried this before? Thanks. ...

Can UILabel's drawTextInRect method be overridden to change the size of UILabel's text?

Apple's documentation for drawTextInRect seems to indicate this is possible: "By the time this method is called, the current graphics context is already configured with the default environment and text color for drawing. In your overridden method, you can configure the current context further and then invoke super to do the actual draw...

Objective-C Method Types

Hi, I'm just starting to teach myself objective-c and attempting to learn the cocoa touch frameworks, as like many people recently I have developed an interested in a certain little multi-touch device. Anyway, I'm following the Stanford tutorials and I have couple of Objective-C books that im starting to make my way through. While comp...

Does it make sense to page a UITableview when it is backed by an NSFetchedResultsController?

Ok, so this is more of a point-of-view question or something. So I have several tableviews that are backed by NSFetchedResultsControllers. So I was thinking about implementing paging for these tableviews but I'm not sure if it makes sense to do so. Quoting from the apple NSFetchedResultsController docs: "When you tell the controller to ...

Is it possible to register a http+domain-based URL Scheme for iPhone apps, like YouTube and Maps?

I'd like to have iPhone OS to open URLs from my domain (e.g. http://martijnthe.nl) with my app whenever the app is installed on the phone, and with Mobile Safari in case it is not. I read it is possible to create a unique protocol suffix for this and register it in the Info.plist, but Mobile Safari will give an error in case the app is ...

Create streaming application on iPhone

I need to create streaming application on iPhone. I have gone through apple's developer forum already. What I want to do here is that I would be implementing my own streaming method. To start with I need to create an application which can get file from some URL using simple streaming and then will display in window (view). I cannot use b...

Tab bar Controller raising NSInternalInconsistencyException

In my SDK 3.0 core data based app, I have a tab bar controller managing 4 tabs. From time to time, apparently randomly, when I launch the app, it crashes with the following message: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Directly modifying a tab bar managed by a tab bar controller is not a...

Unwanted Edit button in my navigation bar?

Hi, I've got the following code in my app to display a modal view: InfoTableViewController *infoTableViewController = [[[InfoTableViewController alloc] initWithNibName:nil bundle:nil] autorelease]; infoTableViewController.title = @"Pirateometer"; infoTableViewController.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] init...

Detect the specific iPhone/iPod touch model

I am making a game that utilizes the peer-to-peer bluetooth capabilities of the iPhone (and probably the iPod touch 2nd generation). However, to stop the users from trying to play a multiplayer on an iPod 1st gen and iPhone 2G I need to check for the specific device model. [[UIDevice currentDevice] model] will only tell me if the device...

iphone - SQLite records on table dont coming ?

hello, i have a table. and 3 record. and i have that code; -(void) readScoreFromDatabase { sqlite3 *database; scores = [[NSMutableArray alloc] init]; if(sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) { const char *sqlStatement = "select name,score from game"; sqlite3_stmt *compiledStatement; if(sqlite3_prepa...

Starting iPhone Development

I'm soon going to be starting some iPhone Development (3.0) building a simple app that communicates with a web service and uses push notification. My objective-c is pretty much non-existent but I've already got some good information from this question and also from Apples development centre. Basically if you've developed with the iPho...

Activity indicator in a UITabBar application on the iPhone

Hi, I have a UITabBar + UINavigationController application which often needs data from the internet. Sometimes it takes quite a while before it gets it, so I would like to show an activity indicator. What I was trying is to add a activityView to my window in my applicationDidFinishLaunching method: [window addSubview:tabBarController....

Unicode problem

Hi friends i search lot but never find a solution exactly..... Can anyone help me? How can i remove \u0097 unicode character from my nsstring... Following methods are i am using but never worked 1)const unichar cStringArray[] = { 0x0097, 0}; NSString* tmp = [NSString stringWithCharacters:cStringArray length:sizeof cStringArray / size...

Publishing Audio from iPhone to HTTP

Hi All, I have read that Apple has allowed iPod Library Access in iPhone OS 3.0 and thus an App can access the data stored in the iPod. I want to know that is there a possibility that the audio being played by an App can be published over a Network Stream. Let me know your thoughts. Thanks and Regards, Muhammad Haseeb Khan ...

Xcode iPhone - Base SDK, Active SDK difference?

What's the difference between the "Base SDK for all configurations" and the "Active SDK" in Xcode? ...

iPhone Build Configuration Enabling Features

Question about best practices. Is there a way to programmatically detect whether the app is being compiled for an AdHoc configuration, and, if so, enable a feature in the app? For example, I am thinking of enabling a switch between beta and prod environment given depending on whether the app is an an AdHoc vs. Release configuration. T...

NSURLConnection delegate didReceiveData trailing characters in data

I've really struggled to figure out why my web service call is riddled with junk data. I have a UITableViewController that calls the web service and also acts as the NSURLConnectionDelegate. Here is the delegate method of interest, note the NSLog statements. - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)d...

UIView doesn't resize to full screen when hiding the nav bar & tab bar

I have an app that has a tab bar & nav bar for normal interaction. One of my screens is a large portion of text, so I allow the user to tap to go full screen (sort of like Photos.app). The nav bar & tab bar are hidden, and I set the the text view's frame to be full screen. The problem is, there is about 50px of white space where the t...

IPHONE SDK Getting Device ID or Mac Address

I have an application that uses rest to communicate to a server, i would like to obtain the iphones either mac address or device ID for uniqueness validation, how can this be done? ...

Reference from UITableViewCell to parent UITableView?

Is there any way to access the UITableView from within a UITableViewCell? (if the cell belongs to that tableView? ...