iphone

Structuring a multi-subview (more than two) iphone app

There are many examples available for apps that switch between just two subviews, but what I am trying to do is set an app that lets me switch between more than 2, such that I'm thinking I need to keep an array of UIViews. The underlying application is to allow the user to page through a list of subviews, forwards or backwards, much l...

iphone uiwebview programatic zoom

Hello guys, i'm developing an app that saves html files locally on iPhone file system, then load them in UIWebView.. i want to be able to zoom or double tap programmatically on the UIWebView, i tried searching for javascript code, but i could only scroll also tried the webview transform, but didn't work out for me. so, i found this me...

UIView border with fade or blur effect

Hi everyone! I'm looking for method to add gradually fading or maybe blured border (I don't exactly know how to name this effect) to arbitrary UIView. I don't need animated effect, I need static effect, for example I my UITableView border being partially transparent. I've made the example: http://i46.tinypic.com/14nz76f.png, so you can...

UIView addSubview: method error problem

Hello, I have the code to add a view [self.view addSubview:RootViewController.view] and it gives me the error error: accessing unknown 'view' class method here is a bunch more stuff that might be helpful. CompileC build/iTracker.build/Debug-iphoneos/iTracker.build/Objects-normal/armv6/NewLogViewController.o Classes/NewLogViewController...

iPhone OS - Screenspace to world space conversion

I am currently trying to convert a touch from screenspace, to where it is in worldspace for a 2D game I am working on. The view I am working on has nearly the same coordinate system as the screen, basically if someone touches the x = 345, y = 500 pixel on the screen, it will be the same on the view, although the y will be backwards beca...

CoreData: How to fetch a specific object using a predicate

Hi, The situation: I fetch a complete table from my sqllite core data database and show it in a TableView like this: NSEntityDescription *entity = [NSEntityDescription entityForName:@"MyTable" inManagedObjectContext:managedObjectContext]; The Challenge: How do I get the EntryID and fetch ...

EXEC_BAD_ACCESS when Dismissing ModalViewController

Hi all - I'm using a pretty standard recipe for presenting ModalViewControllers in my iPhone apps, but I've run across a situation where the recipe is broken and I'm confused. This is how I (pretty much always) set up the presentation: MatcherViewController *controller = [[MatcherViewController alloc] initWithNibName:@"MatcherView" bu...

Errors are reported by iPhone MFMailComposeViewController. Is it safe ?

In trying to send a mail with a simple KML attachemnt (just a few bytes) i'm getting the warnings below in the console during the send. Can these be ignored or have I made an error ? The mail seems to send OK - (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(N...

iPhone & Ipad - how do I fork a code?

My question is this: I have an application designed for iPhone and I decided to fork the code, in other words, I will develop two versions of the application at this initial phase, one for iPhone and the other for iPad. My question is this: how do I fork the code? I would like to continue using one project for both versions but, obvious...

How to Share Files Between my iPhone App and a Mac/PC

Hello everyone. I have developed an iPhone app which stores photos in the /Documents directory of my app. I would like to add a feature which gives to the user the opportunity to transfer those pictures to his/her PC or Mac. I don't really know how to do that. What is the best way, using Bonjour, bluetooth, or directly USB (if it is p...

Application sometimes freezes on iPhone 3G but never on an iPhone 3GS

Has anyone else observed this phenomenon? Is there any clue as to the cause and/or workaround? Thank you in advance. ...

Using system cache of UIImage objects with images loaded from disk cache (NSCachesDirectory)?

Hi, I'm trying to improve scrolling performance on a UITableView that uses cells with images fetched from the web, but stored in the NSCachesDirectory. The cells have a custom content view to draw the contents (an image). When I use a placeholder image from the app bundle, using [UIImage imageNamed:@"Placeholder.png"], scrolling perfor...

How to tell a UITextField to use the NumberPad Keyboard in code ?

Hi I created a UITextField in code, now I have now idea how to define the keybaord that should appear ? I just get the standard keybboard, but I need a numberpad ?! Thanks ...

Emulating NSImage drawInRect:fromRect:operation:fraction with UIImage

I really need to emulate the behavior of NSImage's drawInRect:fromRect:operation:fraction using UIImage and I'm wondering what's the best approach or (better), if somebody already did this and willing to share the code. I tried doing this using CGImageCreateWithImageInRect (see code at the end) but I'm not getting the expected results. ...

How do I implement a basic menu navigation system with Three20?

I'm trying to get started with Three20 and just want to get a basic menu navigation system going. I'm looking for a way to create menu that's just a list view with static text. Selecting an item should be able to move to another menu or a different view controller. Looking at the documentation for Three20, I'm a bit confused by the need...

Timeout a ASIHTTP request

Hello, I'm using the ASIHTTPRequest library to request some data from a server in my iPhone app. But i cannot figure out how to create a timeout so that if the server goes down or the iPhone doesnt have internet connection the app doesnt crash. Thanks in advance EDIT>>> tt.Kilew your code doesnt work... I posted a bit of sample co...

iPhone SDK - How to customize the crop rect in UIImagePickerController with allowsEditing on?

Is there any way to define the crop area rect using the camera image picker? ...

Is there a way to pause a CABasicAnimation?

I have a basic spinning animation of the iPhone. Is there any way that I can "pause" the animation so that the position of the view will be maintained? I guess one way of doing this would be to cause the animation to "complete" instead of calling "remove" on it, how would I do that? CABasicAnimation* rotationAnimation; rotationAnimation...

View Controllers

Okay, I have read books upon books all with great examples of having multiple view controllers with their own Nibs along with reading the apple docs. My question is this: All examples show the multiple view being displayed via a toolbar or tab bar. User clicks some button on one of those mentioned, a new view is displayed, (keeping th...

How do you rotate a Polygon in an UIView without rotating the background

The following code: http://pastie.org/pastes/835022 in a custom UIView rotates the entire view including the gradient background. What is the proper way to rotate the polygon without rotating the background? ...