If I have a UITextField which the user is inputing a registration number, which has the format:
11-11-1111
(that is 2 digits, a dash, 2 digits, a dash, four digits)
How do I force the user to enter this kind of data only (as they are actually entering it)... so they can't enter anything except 0-9 in the first character, and only '-' f...
Hello.
I'm very new on iPhone development. I wondering where to put some custom initialization of an instance variables for my UIViewController.
Can I use initWithNibName:bundle:?
Thanks.
...
Can someone explain to me when it is necessary to define your ivars as pointers?
I've seen many code samples that don't use pointers, while others do.
...
Hey.
I have seen many apps that load data to UITableViews from the internet, and they usually load smoothly. Now it's my turn to load in that kind of data. I am getting different data at the same time, separating categories with ~ and pieces of categories with #. This works great, and I have managed to separate the data in obj-c perfect...
Possible Duplicate:
Is there a best coding style for indentations (same line, next line)?
I noticed in Objective C that xcode automatically uses a strange position of braces:
if (statement) {
}
whereas I am used to using:
if (statement)
{
}
it just makes it easier to read. Is it a matter of preference or is a standard t...
I would like to create my own google maps mash up exactly like wundermaps but with different data.
How can i go about doing this?
http://itunes.apple.com/us/app/wundermap/id364884105?mt=8
...
Hi;
I have create a SinglestonClass in my code but i have a problem.
My variable are initialized in the -init method but when i call the singlestonClass these variable are re-initialize.
Can you help me for create a single initialization for my variable?
thanks.
@implementation SingletonController
@synthesize arrayPosition;
@synthesize...
I'm sorry to ask such a simple question, but it's a specific question I've not been able to find an answer for.
I'm not a native objective-c programmer, so I apologise if I use any C# terms!
If I define an object in test.h
@interface test : something {
NSString *_testString;
}
Then initialise it in test.m
-(id)init {
_test...
Hello,
Xcode is doing something bizzare which I at one point in time fixed but now for the life of me I can't figure out what's wrong.
Xcode is building my project fine - no errors on a clean-all build. All my product names and info.plists agree, all the settings appear to be correct. I've only got the one build configuration (I alw...
Hi
I wish to have it so the view controller's title is different to the tab bar item's title.
I have tried the following, inside viewDidLoad
[self setTitle:@"My title"];
[[self tabBarItem] setTitle:@"Search"];
But the call to the second function doesn't seem to work
...
Hey.
I need to know how you can find out when all processes (loaded) from a - (void) are done, if it's possible.
Why? I'm loading in data for a UITableView, and I need to know when a Loading... view can be replaced with the UITableView, and when I can start creating the cells.
This is my code:
- (void) reloadData {
NSAutoreleaseP...
I've figured out how to hide the navigation bar and then show the toolbar it has built-in but the toolbar appears at the bottom os the screen how can i position the toolbar on the top of the scren?
here's some of my code
UIBarButtonItem *yesterday = [[UIBarButtonItem alloc]initWithTitle:@"Yesterday"
...
Hi,
I have an NSString in an NSObject file, I inherited this NSString into my MainViewController where it gets the value.
Now, I want to use this NSString value in another UIViewController subclass.
From some reason I always get (null)
Here's my code:
MainViewController:
leftWebViewUrl = [NSMutableString stringWithString:leftWebVi...
I have the following:
- (NSInteger) numberOfComponentsInPickerView:(UIPickerView *)pickerView {
return 2;
}
- (NSInteger) pickerView:(UIPickerView *) pickerView numberOfRowsInComponent:(NSInteger) component {
return [genderPickerData count];
return [agePickerData count];
}
When I do this, the UIPicker is split into ...
i want to get date in 2 labels like this
Label1:-> Tuesday
Label2:-> 2 June 2010
how can i get this value?
...
I want two rightBarButtonItem's on my UINavigationBar. How can I accomplish this?
...
NSArray *results = [managedObjectContext executeFetchRequest:request error:&error];
if(results == nil){
NSLog(@"No results found");
searchObj = nil;
}else{
if ([[[results objectAtIndex:0] name] caseInsensitiveCompare:passdTextToSearchFor] == 0) {
NSLog(@"results %@", [[results objectAtIndex:0] name]);
searchO...
I have a RootViewController that is loading a UITableViewController from an external NIB. I am not sure how I can add a toolbar to the RootViewController so that it appears on top of the UITableViewController? When I drag a UIToolbar onto my screen, it replaces the UITableView
...
Interface Builder Question
I know there's a way to change the background color of a table, but is there a way to change the text color?
Please Help
...
Can anyone point me in the right direction regarding sliders, the version below was my first attempt (the range is 0.0 - 100.0) The results I get are not right.
// Version 1.0
-(IBAction)sliderMoved:(id)sender {
NSLog(@"SliderValue ... %d",(int)[sender value]);
}
// OUTPUT:
// [1845:207] SliderMoved ... -1.991753
// [1845:207] Slid...