Search Results

Search found 46 results on 2 pages for 'cannyboy'.

Page 2/2 | < Previous Page | 1 2 

  • Can I refer to NSDictionary items numerically?

    - by cannyboy
    I'm trying to set up a UITableView which acts as a form. Each cell has within it a UILabel and a UITextField, so one cell is: Name <enter name> ^ ^ UILabel UITextField Now, I'm trying to populate the UILabel and the UITextField from a NSDictionary (from a plist), where it's organized like so: Root Type Value Name String Address String City String etc But in order to get the right labels and textfields in the cellForRowAtIndexPath method, I would have to refer to the Dictionary numerically. Is there any way to do that?

    Read the article

  • Communicating between classes set up in nib, in code?

    - by cannyboy
    A beginner's question: If, in your nib, you have the File's Owner linked to the ViewController class, and you also have a NSObject-derived class, how do you communicate between the ViewController class and the NSObject class within code? For instance, suppose ScientificCalculatorView.xib looks like this File's Owner (class: ScientificCalculatorViewController) FirstResponder View Calculator (an object that has been linked to the Calculator class) Obviously, I'd want Calculator to be reusable, so it could be used with a NormalCalculatorViewController or something like that. So that UI and the calculator code are separate. Does Calculator even need to be in the nib? It's a beginners question, but I'm just trying to get my head around it.

    Read the article

  • Best practices and Design Patterns for iPhone forms?

    - by cannyboy
    Part of the app I'm making requires the user to fill in a multi-page form, the contents of which will be saved locally (perhaps using Core Data). Are there any best practices for this? This form just includes text fields. I guess the options are UITextFields, or perhaps a UIWebView, with the fields as part of an html form? Are there are any best practices, or design patterns, which are good for this kind of thing?

    Read the article

  • Adding a footer to a table in another view?

    - by cannyboy
    The app I'm making has a settings view which I want to show on the first run of the app. Normally (after the first run) this view will be pushed onto the screen and there will be a "Back" button in the nav bar. However, on first launch I don't want there to be a back button. Instead, I want to add a 'Done' button at the footer of the table... and then the view can be popped. Here's my code (in my initial view's viewDidLoad). I have removed the back button, but don't know how to add the footer and button. NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; if ([prefs stringForKey:@"firstRun"] == nil) { SettingsViewController *settingsView = [[SettingsViewController alloc] initWithNibName:@"SettingsView" bundle:nil]; settingsView.hidesBottomBarWhenPushed = YES; settingsView.navigationItem.hidesBackButton = TRUE; // add footer button here? [[self navigationController] pushViewController:settingsView animated:YES]; [settingsView release]; [prefs setObject:@"OK" forKey:@"firstRun"]; } else { //something }

    Read the article

  • Forcing entry of certain character types in UITextField

    - by cannyboy
    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... so they can't enter anything except 0-9 in the first character, and only '-' for the third character etc.

    Read the article

  • 'Unable to read symbols' error

    - by cannyboy
    When I 'Build and Go' on the device, the console shows: warning: Unable to read symbols for ""/Users/Steve/Blue/build/Debug-iphoneos"/Blue.app/Blue" (file not found). warning: Unable to read symbols for ""/Users/Steve/Blue/build/Debug-iphoneos"/Blue.app/Blue" (file not found). Is this something I should worry about? If so, where should I look to find the root of the issue? The app works OK, but I'm just worried that this might be an AppStore approval issue.

    Read the article

  • Is there a CSS library which mimics the iPhone grouped UITableView?

    - by cannyboy
    Is there a CSS library which mimics the iPhone grouped UITableView? I want to build a nice looking table which looks exactly like the grouped UITableView. As there are multiple text styles within the each line of text, and I don't need any interactivity except scrolling, it seems it would be easier to build with HTML and display it in a UIWebView. Is there a css library which matches this need?

    Read the article

  • Scroll immediately to row in table before view shows

    - by cannyboy
    A view with a table gets pushed onto the screen and I want it to scroll to a certain row in the table before the screen actually displays. I use this code within the final viewcontroller. NSIndexPath *scrollToPath = [NSIndexPath indexPathForRow:5 inSection:0]; [theTable scrollToRowAtIndexPath:scrollToPath atScrollPosition:UITableViewScrollPositionTop animated:NO]; When I put it in viewDiDAppear method, then it briefly flashes from the intial position of the table (at the top) to the row I want. I don't want it to show the initial position. If I put it in viewDidLoad or viewWillAppear then it crashes with a NSRangeException, presumably because the table isn't set up yet. How would I get it to scroll without showing the initial position?

    Read the article

  • Best way to save to nsuserdefaults for custom class?

    - by cannyboy
    If I have a custom class Person which has three variables (which are propertized and synthesized): NSString* theName; float* theHeight; int theAge; Person instances are stored in an NSArray 'Group'. There is only one Group. What is the best way of string and loading the Group in NSUserDefaults? (bearing in mind that float and int are not legal for NSUserDefaults)

    Read the article

  • Best way of obfuscating / encrypting form data on the iPhone

    - by cannyboy
    I want to create an app which holds sensitive information (imagine it's bank account details, thought it's not). The user enters this information on a form the first time the app starts up. I want this info to be saved, and available, any time the user uses the app (without having to enter a password). However, if the iPhone has a password lock on it, and is stolen, I don't want the data to be easily accessible from the file system. What is the best way of encrypting or obfuscating the data? There is not a lot of data, just a dozen NSStrings from the UITextFields on the form. I'm aware there are encryption export restrictions on the iPhone for non-US developers (I am in UK), so I would prefer to avoid going jumping through any of Apple's app submission hoops to get it on the store.

    Read the article

  • In-app settings controlled by plist?

    - by cannyboy
    Is there a library or good tutorial which covers creating in-app settings, like this: http://img.skitch.com/20090625-s8bf6ahybwe3cesd1id38h3nt.jpg What I would like is if it: doesn't use the built-in Settings app is controlled by a plist file with various Dictionaries and Arrays creates a nice looking table view allows text fields as well as switches and sliders and ticks etc doesn't have any of the annoying problems I've come across when trying to build my own version (not scrolling to show the textfield, cells disappearing) It would appear that the iphone dev world is crying out for such a thing. THANK YOU!

    Read the article

  • How to fill in form field, and submit, using javascript?

    - by cannyboy
    If I have an html document whose rough structure is <html> <head> </head> <body class="bodyclass" id="bodyid"> <div class="headerstuff">..stuff...</div> <div class = "body"> <form action="http://example.com/login" id="login_form" method="post"> <div class="form_section">You can login here</div> <div class="form_section"> <input xmlns="http://www.w3.org/1999/xhtml" class="text" id="username" name="session[username_or_email]" tabindex="1" type="text" value="" /> </div> <div class="form_section">etc</div> <div xmlns="http://www.w3.org/1999/xhtml" class="buttons"> <button type="submit" class="" name="" id="go" tabindex="3">Go</button> <button type="submit" class="" name="cancel" id="cancel" tabindex="4">Cancel</button> </div> </form> </div> </body> </html> You can see that there is a username field and a Go button. How would I, using Javascript, fill in the username and press Go...? I would prefer to use plain JS, rather than a library like jquery.

    Read the article

  • Completely Removing Views from memory

    - by cannyboy
    I have a view which is set up to train 'voiceprints' of words (this voiceprint code is not mine), and another view which has a slideshow which is controlled by the voiceprint. Unfortunately, these views conflict because they are still in memory. As far as I know, viewDidUnload and dealloc are only called in low-memory situations, and dealloc should not be called directly, so how do I completely remove a view. These views are within uinavigationcontrollers by the way.

    Read the article

  • How to find out the format of a float?

    - by cannyboy
    I'm working with someone else's code, and there is a float with some unusual qualities. If I output the float using: NSLog(@"theFloat: %f", record.theFloat); I get: theFloat: 0.000000 However, if I use: NSLog(@"(int)theFloat = %i", (int) record.theFloat); I get: (int)theFloat: 71411232 How do I discover the real format and value of theFloat? I know that it should contain a large number. Incidentally, the Record class which contains the float propertizes it in such a way: @property (assign) float* theFloat; There is also floatLength: @property (assign) int floatLength; And has this method, which seems to indicate that the float is of variable length (?): - (void) copyFloat:(float*)theF ofLength:(int)len { float *floatcopy = malloc(len*sizeof(float)); memcpy(floatcopy, theF, len*sizeof(float)); self.theFloat = floatcopy; }

    Read the article

< Previous Page | 1 2