Search Results

Search found 4564 results on 183 pages for 'sencha touch 2'.

Page 68/183 | < Previous Page | 64 65 66 67 68 69 70 71 72 73 74 75  | Next Page >

  • Changing the UIBackButtonItem title

    - by Alpinista
    I have a navigationController-based app. I want to change the title of the back button for the root view controller. I have tried the following code in the rootViewController's viewDidLoad method, but no success: self.navigationItem.backBarButtonItem.title = @"Back"; Any ideas?

    Read the article

  • Adding methods to an Objective C class interface is optional?

    - by Steve the Plant
    Coming from a C++ background, one thing that confuses me about Objective C is the fact that you can add a method to a class without actually specifying it in the class interface. So I had a barrage of questions: Why would someone choose to not add the method in the class interface? Is it simply because of visibility? Methods without a declaration in the interface are private? Is declaring methods in a class interface just optional? Is it different for overriding a base class' method?

    Read the article

  • Save method in cocoatouch?

    - by Henry D'Andrea
    What is the save method for cocoatouch? I need to add it where the comment is: // whatever you want to do. (BOOL) webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)ntype { if ([request.URL.scheme isEqualToString:@"hide"]) { // whatever you want to do. } return true; }

    Read the article

  • Defined outlets, connected them, they all returns (null)

    - by Tom
    Hi! I'm trying to play with a WebView. I made an outlet: IBOutlet UIWebView *browser; Defined it as a property: @property (nonatomic, retain) IBOutlet UIWebView *browser; Synthethized it: @synthesize browser; Finally, I connected it in Interface Builder, really it is. Then I try to do something with it i.e.: [browser loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://apple.com"]]]; Or also: Etape *etape = [[Etape alloc] init]; NSString *html = [etape generateHTMLforEtape:[current_etape objectAtIndex:0]]; [browser loadHTMLString:html baseURL:nil]; [etape release]; I get no errors, I tried to Build & Analyse, no notices or warnings or errors.. I've been searching for one whole day, please help me :/ Thanks a lot! EDIT: Here's screenshots of my connections for my WebView: EDIT: That is how I call the view: DetailViewController *dvController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:[NSBundle mainBundle]]; dvController.workflow_id = parent_id; Etape *etape = [[Etape alloc] init]; dvController.etapes = [etape getEtapes:parent_id]; [etape release]; [self.navigationController pushViewController:dvController animated:YES]; [dvController release];

    Read the article

  • Does this popup view violate HIGS?

    - by brettr
    Will using a popup view to present a comment submission form violate the HIGS? I may have one popup with selections that goes to the final popup. Two popups back to back. This is more similar to a modal type of view than an alert or action sheet as described by the HIGS: http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/ModalViews/ModalViews.html#//apple_ref/doc/uid/TP40006556-CH11-SW1 under the section 'Using Modal Views'. Basically the type of view I'm shooting for is a combination of an alert with a custom view. It's sort of a mini view since it will be centered in the middle of the screen but not take up all of the viewing area. I'm fairly sure that is a violation however, but I'm looking for a few opinions on it. I believe what needs to happen is use a modal view, which will cover the entire view.

    Read the article

  • How to call a view on click of each UITableViewCell programatically?

    - by Cathy
    Hi, I have created a UITableViewcontroller and a UINavigationController in a TableController.m with UITableviewCell set to say @"CellOne" @"CellTwo". Now i also created two other files `ImageView1.m` ImageView2.m where if i click on CellOne i should be able to get the view placed on ImageView1.m, same applied to the ImageView2.m.How should i achieve this programatically without using nib file?

    Read the article

  • Checking an empty Core Data relationship (SQLite)

    - by rwat
    I have a to-many relationship in my data model, and I'd like to get all the objects that have no corresponding objects in the relationship. For example: Customer - Purchases I want to get all Customers that have 0 Purchases. I've read somewhere that I could use "Purchases[SIZE] = 0", but this gives me an unsupported function expression error, which I think means it doesn't work with a SQLite backing store (which I don't want to switch from, due to some performance constraints). Any ideas?

    Read the article

  • UIImage couldn't load some png picture.

    - by www.ruu.cc
    I Use the following code to load png image: UIImage *imageBack1 = [UIImage imageNamed:@"Bar1.png"]; UIImage *imageBack2 = [UIImage imageNamed:@"Bar2.png"]; imageBack1 work right when imageBack2's value is nil, Bar1.png and Bar2.png are located at the same place,but why Bar2.png couldn't be load?

    Read the article

  • How do I set up a proxy object in the main application NIB?

    - by zoul
    Hello! I would like to set up a proxy object in the application NIB file. The problem is that the NIB file is the main application NIB that gets loaded automatically by the application and therefore I cannot set up the UINibProxiedObjectsKey dictionary as described in the documentation. Is there a way to set up a proxy object in the main application NIB? Or can I tap into the code that loads the main application NIB?

    Read the article

  • How to use NSObject subclass?

    - by Jon
    So I've created a subclass of NSObject called Query @interface Query : NSObject @property (nonatomic, assign) NSNumber *weight; @property (nonatomic, assign) NSNumber *bodyFat; @property (nonatomic, assign) NSNumber *activityLevel; @end Is this correct for setting the object's property? In VC1: BodyFatViewController *aViewController = [[BodyFatViewController alloc]init]; aViewController.query = self.query; [self.navigationController pushViewController:aViewController animated:YES]; In VC2: - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { Query *anQuery = [[Query alloc]init]; anQuery.bodyFat = [self.bodyFatArray objectAtIndex:row]; anQuery.weight = self.query.weight; self.query = anQuery; }

    Read the article

  • Teaching a kid to type in order to start programming

    - by at
    My 5 year old wants to start programming, but he doesn't yet know how to type without looking for each letter 1 at a time. I know it's going to frustrate him to go so slow because of his typing speed. And it's not going to be fun looking for all the letters constantly... So what's the best way to get him to type fast? Clearly he'll need to type a lot of punctuation like semicolons, colons and symbols. So his little hands will have to get used to spreading over the keyboard... I did some google searches and found some very poor looking apps that focused on the letters.

    Read the article

  • Autorelease vs. Release

    - by Sheehan Alam
    Given the two scenarios, which code is best practice and why? Autorelease loginButton = [[[UIBarButtonItem alloc] initWithTitle:@"Login" style:UIBarButtonItemStylePlain target:self action:@selector(loginButtonClicked:)] autorelease]; self.navigationItem.rightBarButtonItem = loginButton; or Release loginButton = [[UIBarButtonItem alloc] initWithTitle:@"Login" style:UIBarButtonItemStylePlain target:self action:@selector(loginButtonClicked:)]; self.navigationItem.rightBarButtonItem = loginButton; [loginButton release];

    Read the article

  • Having a problem with reading a file using NSString initWithContents OfFile

    - by srikanth rongali
    In this program when I debug, it is showing the nil for fileNameString. I could not understand what is the problem. Please help me ? @implementation fromFileRead1 NSString *fileNameString; -(id)init { if( (self = [super init]) ) { fileNameString = [[NSString alloc] initWithContentsOfFile: @"enemyDetails.rtf" encoding:NSUTF8StringEncoding error:nil]; NSArray *lines = [fileNameString componentsSeparatedByString:@"\n"]; for (id *line in lines) { NSLog(@"Line1%@", line ); } } return self; } @end Thank You.

    Read the article

  • Can we send an two dimensional array as input for a function in Objective C.

    - by srikanth rongali
    I have data stored in two dimensional array. I want it to send in to a function in this way, I have written the following in another class. // do if( array[iTemp][1] != 10 ) { Enemy *enemyXX = [[Enemy alloc] init]; [enemyXX EnemyXXTarget: array[iTemp][1]]; iTemp++; }while( iTemp != 9); // -(void)EnemyXXTarget:(id)sender; is function declared in Enemy class. But is giving me an error error: incompatible type for argument 1 of 'EnemyXXTarget:' Where I am wrong ? Please help me. Thank You.

    Read the article

  • How to use NSScanner?

    - by Zopi
    Hi, I've just read Apple's docu of NSScanner. I'm trying to get the integer of that string: @"user logged (3 attempts)". I can't find any example, how to scan within parentheses. Any ideas? Here's the code: NSString *logString = @"user logged (3 attempts)"; NSScanner *aScanner = [NSScanner scannerWithString:logString]; [aScanner scanInteger:anInteger]; NSLog(@"Attempts: %i", anInteger); Regrads, Ruby

    Read the article

  • Using the system localizations on iPhone

    - by nevan
    I want to make a back button for a navigation controller with the title "Back" instead of the title of the previous controller. I'm using this code: UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Back", @"Back") style:UIBarButtonItemStyleBordered target:nil action:nil]; self.navigationItem.backBarButtonItem = backButton; I'd like to be able to skip localizing the "Back" string in my app (since I can only localize it in a limited number of languages). If I give my navigation controller no title, the back button will be automatically localized into whatever the language the user has chosen, so the system has translations of "Back" in many languages. Is there a way to access the localizations that are already present in the system and use them myself? These are things like "Back", "Cancel", "Done" and so on, which show up when creating one of the standard system buttons.

    Read the article

  • How to backup data stored with Core Data - iPhone app?

    - by Alex
    I'm using sqlite for the persistent store, so could I just upload the .sqlite file to, for example, Amazon S3 as a way of providing users with the ability to backup their app data? Then for restoring just download it back and replace the existing .sqlite file in the app's folder. Does anybody see any issues with that? Has anyone done it? Any other suggestions on how to implement data backup feature?

    Read the article

  • First and last UITableViewCell keep changing while scrolling.

    - by W Dyson
    I have a tableView with cells containing one UITextField as a subview for each cell. My problem is that when I scroll down, the text in the first cell is duplicated in the last cell. I can't for the life if me figure out why. I have tried loading the cells from different nibs, having the textFields as ivars. The UITextFields don't seem to be the problem, I'm thinking it has something to do with the tableView reusing the cells. The textFields all have a data source that keeps track of the text within the textField and the text is reset each time the cell is shown. Any ideas? UPDATE: Thanks guys, here's a sample: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSLog(@"Section %i, Row %i", indexPath.section, indexPath.row); static NSString *JournalCellIdentifier = @"JournalCellIdentifier"; UITableViewCell *cell = (UITableViewCell *)[self.tableView dequeueReusableCellWithIdentifier:JournalCellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:JournalCellIdentifier] autorelease]; cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.accessoryType = UITableViewCellAccessoryNone; } if (indexPath.section == 0) { UITextField *textField = (UITextField *)[self.authorCell viewWithTag:1]; [cell addSubview:textField]; self.authorTextField = textField; self.authorTextField.text = [self.textFieldDictionary objectForKey:@"author"]; NSLog(@"Reading Author:%@", [self.textFieldDictionary objectForKey:@"author"]); } else if (indexPath.section == 1) { UITextField *textField = (UITextField *)[self.yearCell viewWithTag:1]; [cell addSubview:textField]; self.yearTextField = textField; self.yearTextField.text = [self.textFieldDictionary objectForKey:@"year"]; NSLog(@"Reading Year:%@", [self.textFieldDictionary objectForKey:@"year"]); } else if (indexPath.section == 2) { UITextField *textField = (UITextField *)[self.volumeCell viewWithTag:1]; [cell addSubview:textField]; self.volumeTextField = textField; self.volumeTextField.text = [self.textFieldDictionary objectForKey:@"volume"]; NSLog(@"Reading Volume:%@", [self.textFieldDictionary objectForKey:@"volume"]); } return cell; }

    Read the article

  • Are @property's necessary for Interface Builder?

    - by Rits
    In my UIViewController subclass, I have 3 UIView's with each a @property as an IBOutlet. I do not use these properties at all in my code. The views get instantiated as soon as the view controller is created and they are deallocated when the view controller is deallocated. I was thinking; can't I just remove the @property's? I did, and I could still connect my instance variables (with IBOutlet) in Interface Builder. So my question now is; is there any use for properties in combination with Interface Builder, or is it OK to leave them out? Is it required for some memory management or something? Or are they really just for use in your own code? And if I do leave them out, do I still need to release them in dealloc?

    Read the article

< Previous Page | 64 65 66 67 68 69 70 71 72 73 74 75  | Next Page >