iphone

How to make UIWebView not act like a browser on the iPhone

My app loads webpages off the internet using a UIWebView. However I'd like to modify the experience so the user won't perceive it to be a webpage. What are some of the things I can do? and how to do it? examples: - Show the page when everything is loaded? - Fade in effect? Suggestions please. ...

iPad/iPhone4 Universal Build

I would like to make a universal build that will run on the iPad and iPhone4. Basically this is the 'HD' build of a game which will run on the higher resolution display devices. As far as I know, the iPad and iPhone4 both run armv7, so choosing armv6 and armv7 doesn't seem to make sense. Although, this is what Apple tells you to do. ...

Problem With A Subview To Window Iphone sdk 4

The following code is in my "switchviewcontroller.m" file - (void)viewDidLoad { MainView *mainController=[[MainView alloc] initWithNibName:@"Blue View" bundle:nil]; self.mainViewController=mainController; [self.view insertSubview: mainController atIndex:0]; [mainController relea...

Inner Shadow in UILabel

is it possible to create such a UILabel with inner and outer shadow? i only know shadowColor and shadowOffset zoomed: thanks! ...

How would I drag UITextView around the view screen?

Hi, I have a project where a UITextView (for multilines) can be dragged around the screen. So far my solution to this has been an overlay of an invisible UIButton which when dragged its center is the same as the UITextView's center. However I've seen apps that seem to just allow the UITextView to be dragged and edited on the fly so it...

iPhone Three20 TTTableMoreButton Loading More Rows

Hey there, I've got an app called AppAdvice that seems to be using Three20. I've noticed they have a mechanism in place within most of the tableviews that will automatically load more results when you scroll down to the bottom of the list and reveal the last row. The also have an indicator in the last row that tells the user more it...

How to properly transform a UIView with a custom drawRect method

Hi I've written a UIView subclass which adds a nice soft shadow underneath a png image. I'm overriding the drawRect method to draw the image and add the shadow. Now, when I try to do a scale/rotate-affine transform on the UIView (by calling the .transform method), I'm not getting the result I'm looking for due to the initial "flattenin...

How to set margins (padding) in UITextView?

I have a UITextView for text editing. By default, it has a small margin around the text. I want to increase that margin by a few pixels. The contentInset property gives me margins, but it does not change the text "wrap width". The text is wrapped at the same width, and the extra "margin" just causes the view to scroll horizontally. ...

How do I draw a simple ellipse using CoreGraphics on the iPhone (specifically iPad)?

Just wondering how to draw an ellipse using CoreGraphics. ...

Duplicate symbol issues

During a refactor of an iOS project, I ran into this bear of a bug. During the linking phase, I get this message: ld: duplicate symbol _OBJC_IVAR_$_TinCanViewController.currentViewController in /path/to/TinCanViewController-E98A666B7AF2673A.o and /path/to/TinCanViewController-E98A666B7AF2673A.o As far as I can tell, it looks like i...

How to determine what Frameworks IPhone App uses?

I was wondering what is the way to get a list of Frameworks used by iPhone App? Apple is doing it during AppStore approval process. I would like to know if certain games are using Open GL ES... ...

Why don't my buttons go?

I'm setting up two buttons inside UITableViewCells. The cell itself shouldn't ever respond to selection, just my two buttons. Here's the code in question: -(UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *ident = @"ResourceResultsCells"; ResourceResultsTab...

iPhone Objective-C OAuth: A more elegant way to check if a request token is still valid?

I want to do this when the app loads, so I can either ask the user to log in (if not authenticated) or else continue. The only way I can think of is to call a random request (a GET that requires authentication) and check whether or not I get a valid response, but this seems inelegant. I am using the Foursquare API. Are there better w...

Passing argument 1 of 'setQuantity:' makes pointer from integer without a cast

I have a UILabel that I need to get the value from as an integer so I can save it to my Core Data object but I keep getting this error and failure at this point. PurchaseOrderItem *newPOItem = (PurchaseOrderItem*) [NSEntityDescription insertNewObjectForEntityForName:@"PurchaseOrderItem" inManagedObjectContext:managedObjectContext]; ...

Core Data - Predicates with NSDates

Hallo, I am working on a Core Data app and have to do some filtering based on dates. I've run some testing and it appears that when comparing NSDates, Core Data is comparing the time component of the dates as well. My code: - (BOOL)hasSpeakersWithinDateRangeFrom:(NSDate *)startOfRange through:(NSDate *)endOfRange { NSPredicate* d...

Sample code for iPhone location-based push notifications?

There's something I'm not seeing with Apple's push notification programming guide & related documentation. Is there a decent sample project (or well written tutorial) to show me how to do push location notifications? Here's what I want to do: Launch my app. Press the "remember this spot" button. Quit my app. [... time passes ...] Ge...

Displaying last state of application on startup?

According iPhone application programmer guide, an application should load with the state it was in when last quit. This requirement surely brings better usability but also requires some coding effort... My question is: since iPhone OS 4.0 is released and is keeping last application state automatically, is this effort really justified ...

Storing NSTimer objects in NSMutableDictionary

Hi, using iphone sdk 4.o. I am attempting to store around 10 NSTimer object in a NSMutableDictionay and then index them by key. This is to save 10 diffent startTimer, stopTimer functions. I have done like this but am worried about memory leak issues Is the below code safe, is it ok to copy timer objects into a dict. TimerList is a prop...

MPEG1 to MPEG4?

Hi How to convert thro objective-C the MPEG1 to MPEG4? Is there any application that does, so that i can add to my app and test? Thanks. ...

What is the best way to write a hybrid iPhone app?

I'm developing an iPhone application that will access XML files (or something similar) from a server. I want to convert that data into a slick, native UI on the iPhone. With my current knowledge I could already do this by loading the files, parsing them, writing custom code to fill in data structures and convert the data into user interf...