When a user moves their iPhone, my views switch appropriately between portrait and landscape mode with no problem using the following code:
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortra...
Is it possible to have a WebView zoomed in by default. Im trying to place and advert in my application and would like it to be zoomed to 100% by default so it fills the space.
Being able to disable zooming would also be a benefit but I cant disable all interaction as I would like them to be able to click the link
...
I have been developing a location based application and would ideally like to link directly to the directions using the Google application.
I have seen a few applications such as AroundMe which already seem to do this but I can't work out how they have managed to implement it
...
Hi There,
Im trapping link clicked information in a UIWebView in the shouldStartLoadWithRequest delegate. I am using mainDocumentURL to get the url of the linked clicked. This shows the complete url but I need JUST the name of the page i.e .html, .htm etc requested. I cant see any property that would return this. Do i need to parse and e...
In my AppController I'm loading a View with the following code.
- (void) loadSettingsController {
settingsViewController = [[SettingsViewController alloc] initWithNibName:@"SettingsView" bundle:nil];
UIButton *button = settingsViewController.loginButton;
[button addTarget:self action:@selector(saveSettings:) forControlEvent...
When working with Cocoa/Cocoa-Touch and the iPhone SDK, a typical convention is to build a client which speaks to a server-side web server. One common problem I face when programming is making multiple HTTP requests in sequence, sometimes up to 5-6 requests. The order in which the requests are made is not linear in which they will return...
-(id)init {
if (self = [super init]) {
self.name = [[NSString alloc] init];
self.type = [[NSString alloc] init];
self.phoneNumber = [[NSString alloc]init];
self.webAddress = [[NSString alloc] init];
NSMutableArray *pricesArray = [[NSMutableArray alloc] init];
NSMutableArray *poolsArray = [[NSMutableArray alloc] init];
self.pric...
I'm interested in the way I am retaining my properties and the aspects of memory management. This is for a simple application that edits the information of a class that is stored in a table. There are 3 ViewControllers.
A list view (list all classes)
a detail view of the selected item
(lists properties of selected class)
an edit view...
We are using a UITextView with a dark background. As such we have made the text white color in order to be easier to read. The problem is the magnify window that pops up when you hold down your finger to move the insertion point uses white for the text color as well. This makes it impossible to see exactly where the insertion point is...
At the beginning of my app, I am initializing a UIViewController with a NIB.
At some point, I am removing the view from the screen, then releasing it, so it no longer takes up memory. (At this point I am also saving the state of the view in the UIViewController)
At a later point, I want to recreate the view and bring it back on screen...
I'm trying to create a navigation view in the Interface Builder. It's not in the MainWindow.xib, so the relevant sample project on the Apple Dev. site is useless.
The most logical (and cleanest) way to approach this seems to create a Xib-file where the File's Owner is a subclass of UINavigationController - however, I cannot get this to ...
Hi
I am creating a custom UITableViewCell to include an image and some related text. I am getting the images from the Internet and while the images load, I display a temporary image.
I am using a separate thread to get the images. Once an image is downloaded, I am firing a method on the main thread to set the image in the UIImageView (...
What object is responsible for dipatching the UIViewController rotation method calls, i.e:
– shouldAutorotateToInterfaceOrientation:
– willRotateToInterfaceOrientation:duration:
– willAnimateFirstHalfOfRotationToInterfaceOrientation:duration:
– willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration:
– didRotateFromInterfaceOri...
My iPhone app initiates a phone call with:
NSURL *phoneURL = [NSURL URLWithString:[NSString stringWithFormat:@"tel://%@", @"11111111"]];
[[UIApplication sharedApplication] openURL:phoneURL];
This is from a UIView inside a UINavigationController. It is not the root UIView however.
When the phone app is finished with the call and retu...
I have an overlay that I want to slide in my cocoa-touch application. I have created the view controller for it and the corresponding nib. The nib just has a View with a text field in it.
I move to the view using:
[[self navigationController] pushViewController:[[[AddPlayerViewController alloc] initWithNibName:@"AddPlayerViewController...
I am trying to create a reusable "picker". It is basically like a keypad of a phone. Since I will be using this a lot in my iPhone app, I have been frustrated with trying to make it appear.
It is in its own XIB file and has its own UIViewController subclass as the FileOwner.
However, when I instantiate this with:
MonthPickerViewControl...
I've attempted to observe the (readonly) visibileViewController property of a UINavigationController with no success. I was able to successfully observe a readwrite property I defined myself for testing purposes on another class.
Is it possible to observer readonly attributes?
...
I want to be able to debug C structures without having to explicitly type every property that they consist of.
i.e. I want to be able to do something like this:
CGPoint cgPoint = CGPointMake(0,0);
NSLog(@"%@",cgPoint);
Obviously the '%@' won't work, hence the question.
...
I've been looking through the iPhone's UI catalog and cant seem to find what I'm looking for.
Essentially I want a customizable version of the 'in call' menu as found on the iPhone so I can use my own icons and call my own functions.
Example of 'in call' menu: http://cache.gizmodo.com/assets/resources/2007/08/call-vodafone.jpg
UIAler...
I would like to put some sample images in the applications Documents directory. Can I put these somewhere in my xcode project or do I have to programmatically add them to the Documents folder from the project resources?
Users will be able to add their own images (which will be written to the Documents folder) and I would prefer not to a...