Search Results

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

Page 73/183 | < Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >

  • Loading an external NIB, how do I set the view property?

    - by Sheehan Alam
    If I am loading a view from another NIB, how do I set the File's Owner view property? IB is not letting me hook it up to my View Controller which is loading the external NIB. My NIB looks like this: File's Owner - Identity is set to LBRootViewController First Responder LBTableViewController - Identity is set to LBTableViewController, NIB Name is LBTableViewController

    Read the article

  • how to hide backbar button in navigationbar in iPhone sdk

    - by Prerak
    Hi, In my iPhone App there are three views [ firstView secondView and thirdView} now I want to put Back Button in navigation bar in thirdview only which should take me to back secondview only for that i m writting this code in first view self.navigationItem.hidesBackButton:NO; and it shows the back button in both the views secondView and thirdView what I should do to hide back button in the the second view? please Help and Suggest. thanks.

    Read the article

  • UItextView in UITableview, autocorrection bubble not visible

    - by f0rz
    Hello! I have a UITableView with custom cells. The cells containing one UITextView each and the cell is resizing during user type text in the TextView. My problem is when user is on first row in a TextView autocorrection bubbles wont be visible in the current cell. Is there any workaround or can someone point me to another direction?

    Read the article

  • very strange thread error message

    - by John Smith
    I an trying to put a method in a separate thread in the background. It nearly works except that occasionally I get a lot of error messages with the message METHODCLOSURE: OH NO SEPERATE THREAD with the bad spelling and all. Does anyone know what this means?

    Read the article

  • can I use NSDictionary values as [@"[array abjectAtIndex:value]", key1,nil] ?

    - by srikanth rongali
    I have a string of comma separated values in this way (0.2,0.3,0.4,1.0). I used componentsSeperatedByString to store the values in an NSArray. Now I need to store them in NSDictionary as (1st value from NSArray), key1, (2nd Value of NsArray), key2,..nil]; My program is in this way NSArray *split1; NSDictionary *enemy1; float value1; for(id line in lines) { string1 = line; split1 = [string1 componentsSeparatedByString:@","]; numberOfValues = [split1 count]; for(id value in split1) { enemy1 = [NSDictionary dictionaryWithObjectsAndKeys:@"[[split1 objectAtIndex:0]flaotValue]", @"A1", nil]; } } value1 = [enemy1 objectForKey:@"A1"]; Here lines is an NSArray consisting of CSV strings of number 10. I am getting error as error: incompatible types in assignment Should I do not write my code in this way? Where I doing wrong ? Please tell me my mistakes. Thank You.

    Read the article

  • initWithCoder not working as expected?

    - by fuzzygoat
    Does this seem right, the dataFilePath is on disk and contains the right data, but the MSMutable array does not contain any objects after the initWithCoder? I am probably just missing something, but I wanted to quickly check here before moving on. -(id)initWithCoder:(NSCoder *)decoder { self = [super init]; if(self) { [self setReactorCore:[decoder decodeObjectForKey:@"CORE"]]; } return self; } . -(id)init { self = [super init]; if(self) { if([[NSFileManager defaultManager] fileExistsAtPath:[self dataFilePath]]) { NSMutableData *data = [[NSMutableData alloc] initWithContentsOfFile:[self dataFilePath]]; NSKeyedUnarchiver *unArchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data]; NSMutableArray *newCore = [[NSMutableArray alloc] initWithCoder:unArchiver]; [self setReactorCore:newCore]; [newCore release]; [data release]; [unArchiver release]; } else { NSMutableArray *newCore = [[NSMutableArray alloc] init]; [self setReactorCore:newCore]; [newCore release]; } } return self; } gary

    Read the article

  • Best practice - Accessing preferences globally

    - by JK
    User preferences for my app is store in NSUserDefaults. This includes a "theme" preference, which needs to be accessed frequently by multiple classes. I would prefer not to call "[[NSUserDefaults standardUserDefaults] objectForKey:..." repeatedly as it makes for inconcise code and I assume will incur overhead. What is the preferred and most concise method for accessing preferences in any class?

    Read the article

  • Performance issue finding weekdays over a given period

    - by Oysio
    I have some methods that return the number of weekdays between two given dates. Since calling these methods become very expensive to call when the two dates lie years apart, I'm wondering how these methods could be refactored in a more efficient way. The returned result is correct but I feel that the iphone processor is struggling to keep up and consequently freezes up the application when I would call these methods over a period of say 10years. Any suggestions ? //daysList contains all weekdays that need to be found between the two dates -(NSInteger) numberOfWeekdaysFromDaysList:(NSMutableArray*) daysList startingFromDate:(NSDate*)startDate toDate:(NSDate*)endDate { NSInteger retNumdays = 0; for (Day *dayObject in [daysList objectEnumerator]) { if ([dayObject isChecked]) { retNumdays += [self numberOfWeekday:[dayObject weekdayNr] startingFromDate:startDate toDate:endDate]; } } return retNumdays; } -(NSInteger) numberOfWeekday:(NSInteger)day startingFromDate:(NSDate*)startDate toDate:(NSDate*)endDate { NSInteger numWeekdays = 0; NSDate *nextDate = startDate; NSComparisonResult result = [endDate compare:nextDate]; //Do while nextDate is in the past while (result == NSOrderedDescending || result == NSOrderedSame) { if ([NSDate weekdayFromDate:nextDate] == day) { numWeekdays++; } nextDate = [nextDate dateByAddingDays:1]; result = [endDate compare:nextDate]; } return numWeekdays; }

    Read the article

  • How can we add scrolling text in cocos2d by using UITextView ?

    - by srikanth rongali
    I want a UITextView in cocos2d. I used in init method I wrote the code, UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(0,0, windowSize.height/2,windowSize.width/2)]; textView.backgroundColor = [UIColor clearColor]; textView.text = @"I am First enemy"; [textView setEditable:NO]; [[[CCDirector sharedDirector]openGLView]addSubview:textView]; the orientation is [[CCDirector sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft]; I need the text to appear in landscape mode, but I am getting the text in following way. How can I make the text to appear in the landScape mode. I am working in cocos2d. CanOI scroll the text ? What should i add to make the text scroll up and down. Thank you.

    Read the article

  • unclear use of @property in window app using core data

    - by Matt
    Looking through a Window based application ive used to experiment with as a way of getting my head around core data, ive noticed that the appdelegate has the following code myAppDelegate.h #import <UIKit/UIKit.h> #import <CoreData/CoreData.h> @interface iCaptureFreeAppDelegate : NSObject <UIApplicationDelegate> { NSManagedObjectModel *managedObjectModel; NSManagedObjectContext *managedObjectContext; NSPersistentStoreCoordinator *persistentStoreCoordinator; UIWindow *window; UITabBarController *tabBarController; } myAppDelegate.m #import "myAppDelegate.h" @interface iCaptureFreeAppDelegate (PrivateCoreDataStack) @property (nonatomic, retain, readonly) NSManagedObjectModel *managedObjectModel; @property (nonatomic, retain) NSManagedObjectContext *managedObjectContext; @property (nonatomic, retain, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator; @end @implementation iCaptureFreeAppDelegate @synthesize window, tabBarController; // code .... // - (NSManagedObjectContext *) managedObjectContext { } - (NSManagedObjectModel *)managedObjectModel { } - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { } // etc..... i want to understand a few things about what this project is doing why the properties in the category declaration? (if i delete the privateCoreDataStack category everything still works...) why the properties appear to be linked with the methods in the implementation ... managedObjectContext {} etc why the members in the .h file have the same name as the properties and the methods why code completion lets me use dot '.' to access the members but then fails on compilation say it cant find a getter thanks !

    Read the article

  • UITableViewCell similar to one in "Things" app

    - by Fiedorowski
    Hi im looking (but cant find) for sample app that will show me how to implement UITableView with custom UITableViewCell that is similar to one in the Things app, with smooth animation from read-only view (that hides empty cells) to editable view that shows only cells that can be edited, and custom cell with multiline input with small image. I would appreciate if someone could point me in the right direction. Im new to Cocoa/Objective-C programming but Im familiar with Object Oriented programing concepts.

    Read the article

  • Displaying a "Loading..." screen in a UITableView like the AppStore App...

    - by Mugunth Kumar
    the App Store app and fairly a lot many apps display a view that says "Loading.." while the content is being retrieved. How can we do this? Should I remove the UITableView and call addSubView and then once the data is available, add the tableview back? Or is there any other shortcut? If my question is not clear, please see this image... http://www.flickr.com/photos/mugunthkumar/3774575906/ I want to know how to create a temporary loading view like this till my tableview contents are ready...

    Read the article

  • How is an AppDelegate instanciated?

    - by pwny
    I have an iOS application for which I want to create a ViewController programmatically. I started an empty XCode project and modified the main method so it looks like this int main(int argc, char *argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; int retVal = UIApplicationMain(argc, argv, nil, @"MyAppDelegate_iPad"); [pool release]; return retVal; } The app is a Universal Application, MyAppDelegate_iPad is a subclass of MyAppDelegate, which is a subclass of NSObject <UIApplicationDelegate>. My problem is that the applicationDidFinishLoading method I've overridden in MyAppDelegate_iPad is never called (break point on the first line never hits). The method looks like this -(void) applicationDidFinishLaunching:(UIApplication *)application { window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; if(!window) { [self release]; return; } window.backgroundColor = [UIColor whiteColor]; rootController = [[MyViewController alloc] init]; [window addSubview:rootController.view]; [window makeKeyAndVisible]; [window layoutSubviews]; } I removed the line to link to a nib file from my plist file (I used to get the default "My Universal app on iPad" white screen) and now all that is displayed is a black screen. applicationDidFinishLoading is still not being called. Am I doing something wrong? How should I properly create my AppDelegate instance?

    Read the article

  • Error : Number of Rows In Section in UITableView in iPhone SDK

    - by Meghan
    I am getting this error while I am trying to load the data into my table view. Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (73) must be equal to the number of rows contained in that section before the update (71), plus or minus the number of rows inserted or deleted from that section (3 inserted, 0 deleted). What could be wrong? Thanks EDIT : I am initializing the array on ViewWillAppear and adding new objects to the same array on Tableview's didSelectRowAtIndexPath method Here is the code On viewWillAppear : cellTextArray = [[NSMutableArray alloc] init]; [cellTextArray addObjectsFromArray:newPosts]; Here is the code which modifies the array on didSelectRowAtIndexPath : [cellTextArray addObjectsFromArray:newPosts]; NSMutableArray *insertIndexPaths = [NSMutableArray array]; for (NSUInteger item = count; item < count + newCount; item++) { [insertIndexPaths addObject:[NSIndexPath indexPathForRow:item inSection:0]]; } [self.table beginUpdates]; [self.table insertRowsAtIndexPaths:insertIndexPaths withRowAnimation:UITableViewRowAnimationFade]; [self.table endUpdates]; [self.table scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionNone animated:YES]; NSIndexPath *selected = [self.table indexPathForSelectedRow]; if (selected) { [self.table deselectRowAtIndexPath:selected animated:YES]; } Here newPosts is an array which has the values that are added to cellTextArray on didSelectRowAtIndexPath method and viewWillAppear method.

    Read the article

  • Keeping User-Input UITextVIew Content Constrained to Its Own Frame

    - by siglesias
    Trying to create a large textbox of fixed size. This problem is very similar to the 140 character constraint problem, but instead of stopping typing at 140 characters, I want to stop typing when the edge of the textView's frame is reached, instead of extending below into the abyss. Here is what I've got for the delegate method. Seems to always be off by a little bit. Any thoughts? - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text { BOOL edgeBump = NO; CGSize constraint = textView.frame.size; CGSize size = [[textView.text stringByAppendingString:text] sizeWithFont:textView.font constrainedToSize:constraint lineBreakMode:UILineBreakModeWordWrap]; CGFloat height = size.height; if (height > textView.frame.size.height) { edgeBump = YES; } if([text isEqualToString:@"\b"]){ return YES; } else if(edgeBump){ NSLog(@"EDGEBUMP!"); return NO; } return YES; } EDIT: As per Max's suggestion below, here is the code that works: - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text { CGSize constraint = textView.frame.size; NSString *whatWasThereBefore = textView.text; textView.text = [textView.text stringByReplacingCharactersInRange:range withString:text]; if (textView.contentSize.height >= constraint.height) { textView.text = whatWasThereBefore; } return NO; }

    Read the article

  • Which are the most useful techniques for faster Bluetooth?

    - by Mike Howard
    Hi. I'm adding peer-to-peer bluetooth using GameKit to an iPhone shoot-em-up, so speed is vital. I'm sending about 40 messages a second each way, most of them with the faster GKSendDataUnreliable, all serializing with NSCoding. In testing between a 3G and 3GS, this is slowing the 3G down a lot more than I'd like. I'm wondering where I should concentrate my efforts to speed it up. How much slower is GKSendDataReliable? For the few packets that have to get there, would it be faster to send a GKSendDataUnreliable and have the peer send an acknowledgement so I can send again if I don't get the Ack within, say, 100ms? How much faster would it be to create the NSData instance using a regular C array rather than archiving with the NSCoding protocol? Is this serialization process (for about a dozen floats) just as slow as you'd expect from an object creation/deallocation overhead, or is something particularly slow happening? I heard that (for example) sending four seperate sets of data is much, much slower, than sending one piece of data four times the size. Would I make a significant saving by sending separate packets of data that wouldn't always go together in the same packet when they happen at the same time? Are there any other bluetooth performance secrets I've missed? Thanks for your help.

    Read the article

  • UITableView does not scroll to cell

    - by Sheehan Alam
    I am trying to scroll my tableview to the 2nd cell: [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:0] atScrollPosition:UITableViewScrollPositionNone animated:NO]; I get the error: *** Terminating app due to uncaught exception 'NSRangeException', reason: '-[UITableView scrollToRowAtIndexPath:atScrollPosition:animated:]: section (1) beyond bounds (0). ' My tableview has 30 cells that are appearing with no sections.

    Read the article

  • Core data fetch only returns unique managed objects

    - by JK
    I execute a core data fetch which specifies a predicate as follows: NSPredicate *predicate = [NSPredicate predicateWithFormat:@"identifier IN %@", favoritesIDs]; When there are duplicate items in the favoriteIDs array, the fetch request only returns 1 managed object. How can I ensure that more than one instance is fetched? Thank you.

    Read the article

  • Navigationcontroller, why isnt this working?

    - by f0rz
    Hi ! Why wont this work? View1 loads View2. In view2: - (void) goToView { View3 *plainText = [[Tabview_testViewController alloc] initWithNibName:@"View3" bundle:nil]; [self.navigationController pushViewController:plainText animated: NO]; [plainText release]; } - (void)viewDidLoad { [self goToView]; [super viewDidLoad]; } This will not trigger navigationController to pushView, but if I add a button and setAction (goToView) it works perfectly. What kind of problem do I missing here? Regards

    Read the article

  • How To load scroll view of some place directly

    - by ratnasomu
    hai to all , I have added a scroll view of content size 320,1000 to my view its working properly and loading with starting content of scroll view. But,now I want it like showing some place of it when its getting load. that is it shows directly some place of it instead of starting of the content ... Help me it is urgent .. I have tried with [scrollView1 scrollRectToVisible:CGRectMake(60, 300, 240, 40) animated:NO]; [scrollView1 zoomToRect:CGRectMake(60, 300, 240, 40) animated:YES]; but its not working could any one help me .. Thanks

    Read the article

< Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >