Search Results

Search found 800 results on 32 pages for 'tap'.

Page 22/32 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • iOS : is it possible to open previous viewController after crashing and re-launch app?

    - by Nitin Gohel
    How to achieve this stuff below? Please give me some guidance for it. I describe my issue below. When I tap home button and remove app from tray and while I am opening app I get the login screen. I know how to use NSUserDefaults well. But my issue is that when I navigate 3rd or 4th viewController and I press Home Button and remove app from tray, Then whenever I open app than I want to open with last open viewController. Also same when my app is Crashing and I am opening it again then I want to open app with last open viewController state. So I just want to know that is that possible or not? If yes, then please guide me how to achieve this stuff. Thank you

    Read the article

  • UIView animation does not animate at first try?

    - by Bacalso Vincent
    Considering that my _palette's frame is like this: _palette.frame = CGRectMake(0,480,320,200); I have this code here to slide up/down a UIView: if(![_pallete superview]) { [self.view addSubview:_pallete]; [self.view insertSubview:_tempViewPaletteListener belowSubview:_pallete]; [UIView animateWithDuration:0.3 animations:^{ _pallete.top -= kPaletteHeight; } completion:^(BOOL isFinished) { }]; } else { [UIView animateWithDuration:0.3 animations:^{ _pallete.top += kPaletteHeight; } completion:^(BOOL isFinished) { [_tempViewPaletteListener removeFromSuperview]; [_pallete removeFromSuperview]; }]; } *the _tempViewPaletteListener is just a view with a tap gesture use to dismiss the palette* The problem is when I first try to run code here, the _palette view will just stiffly display right away. What I expected is, it should slide up the _palette view. Though it works fine after the first try

    Read the article

  • UILabels text disappears when animating

    - by Wilhelm Michaelsen
    I have this code: - (void)my_button_tapped { if (my_button.tag == 0) { [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.5]; my_label.frame = CGRectMake(450, 455, 200, 20); [UIView commitAnimations]; [my_button setBackgroundImage:[UIImage imageNamed:@"check.png"] forState:UIControlStateNormal]; my_button.tag = 1; } else { [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.5]; my_label.frame = CGRectMake(450, 455, 0, 20); [UIView commitAnimations]; [my_button setBackgroundImage:nil forState:UIControlStateNormal]; my_button.tag = 0; } } When I tap my_button first time the label is expanded into 200px width, when I press the button again the label decreases to 0px width but immediately at button press the text disappears. What's wrong?

    Read the article

  • Why does UIActionSheet cancel crahes my App?

    - by Tim Büthe
    I try to use the UIActionSheet within my iPhone App but have the following problem. When I tap the cancel button "I don't", the app crashes. When I remove the NSLog statement from the actionSheet:clickedButtonAtIndex: it does not. The "Yes, do it" button works just fine and I see the log statement in the console. What's wrong? - (void) doItWithConfirm { UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"do you really wanna do it?" delegate:self cancelButtonTitle:@"I don't" destructiveButtonTitle: nil otherButtonTitles:@"Yes, do it", nil]; [actionSheet showInView:self.view]; [actionSheet release]; } - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { NSLog(@"buttonIndex: %@", buttonIndex); }

    Read the article

  • testing an in app purchase??

    - by hemant
    i developed a application with in app purchases..when user buys the subscription it gets stored on my server..after testing it few times i deleted the data from server to test it again but when i buy it the sandbox environment says u you already purchased this.TAP OK to download it again for free also i have used this test account on my previous application?? does it means i will have to create a new test account for this application?? also by mistake i used this account on apple store..i read somewhere that doing this will make your test account invalid...is it true?? should i create a new account for it??

    Read the article

  • How to add "loading" screen for UIWebView app each time new page is being loaded?

    - by AragornSG
    I have an app that works with tabs and webview. I already have it setup to refresh the page assigned to a tab each time the item on tabbar is selected. My problem now is that it takes some time to load the page and it's impossible to say if the page being displayed is the old or refreshed one. What I want to do is add a "loading" screen (a simple image) which will be displayed until the refreshed page is loaded. Here is the function I run on each tab tap: - (void) goToPage:(NSString *)sid { NSString *newURL = [NSString stringWithFormat:@"%@/mykingdom.php?sid=%@", appURL, sid]; [secondView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:newURL]]]; } Thanks!

    Read the article

  • What is the most under-valued part of .NET?

    - by Jan Bannister
    The .NET framework is massive. I've used it for years and I've still not used most of it. I'd like to expand my knowledge of the Framework's backwaters but just reading thought it seems daunting. So I thought I'd tap up the Stack Overflow community first. What part have you found to be the most surprisingly useful? What's your favourite obscure namespace? And conversely are there any shiny bits that are best avoided?

    Read the article

  • Custom Section Name Crashing NSFetchedResultsController

    - by Mike H.
    I have a managed object with a dueDate attribute. Instead of displaying using some ugly date string as the section headers of my UITableView I created a transient attribute called "category" and defined it like so: - (NSString*)category { [self willAccessValueForKey:@"category"]; NSString* categoryName; if ([self isOverdue]) { categoryName = @"Overdue"; } else if ([self.finishedDate != nil]) { categoryName = @"Done"; } else { categoryName = @"In Progress"; } [self didAccessValueForKey:@"category"]; return categoryName; } Here is the NSFetchedResultsController set up: NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Task" inManagedObjectContext:managedObjectContext]; [fetchRequest setEntity:entity]; NSMutableArray* descriptors = [[NSMutableArray alloc] init]; NSSortDescriptor *dueDateDescriptor = [[NSSortDescriptor alloc] initWithKey:@"dueDate" ascending:YES]; [descriptors addObject:dueDateDescriptor]; [dueDateDescriptor release]; [fetchRequest setSortDescriptors:descriptors]; fetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:managedObjectContext sectionNameKeyPath:@"category" cacheName:@"Root"]; The table initially displays fine, showing the unfinished items whose dueDate has not passed in a section titled "In Progress". Now, the user can tap a row in the table view which pushes a new details view onto the navigation stack. In this new view the user can tap a button to indicate that the item is now "Done". Here is the handler for the button (self.task is the managed object): - (void)taskDoneButtonTapped { self.task.finishedDate = [NSDate date]; } As soon as the value of the "finishedDate" attribute changes I'm hit with this exception: 2010-03-18 23:29:52.476 MyApp[1637:207] Serious application error. Exception was caught during Core Data change processing: no section named 'Done' found with userInfo (null) 2010-03-18 23:29:52.477 MyApp[1637:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'no section named 'Done' found' I've managed to figure out that the UITableView that is currently hidden by the new details view is trying to update its rows and sections because the NSFetchedResultsController was notified that something changed in the data set. Here's my table update code (copied from either the Core Data Recipes sample or the CoreBooks sample -- I can't remember which): - (void)controllerWillChangeContent:(NSFetchedResultsController *)controller { [self.tableView beginUpdates]; } - (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type newIndexPath:(NSIndexPath *)newIndexPath { switch(type) { case NSFetchedResultsChangeInsert: [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] withRowAnimation:UITableViewRowAnimationFade]; break; case NSFetchedResultsChangeDelete: [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; break; case NSFetchedResultsChangeUpdate: [self configureCell:[self.tableView cellForRowAtIndexPath:indexPath] atIndexPath:indexPath]; break; case NSFetchedResultsChangeMove: [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; // Reloading the section inserts a new row and ensures that titles are updated appropriately. [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:newIndexPath.section] withRowAnimation:UITableViewRowAnimationFade]; break; } } - (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id <NSFetchedResultsSectionInfo>)sectionInfo atIndex:(NSUInteger)sectionIndex forChangeType:(NSFetchedResultsChangeType)type { switch(type) { case NSFetchedResultsChangeInsert: [self.tableView insertSections:[NSIndexSet indexSetWithIndex:sectionIndex] withRowAnimation:UITableViewRowAnimationFade]; break; case NSFetchedResultsChangeDelete: [self.tableView deleteSections:[NSIndexSet indexSetWithIndex:sectionIndex] withRowAnimation:UITableViewRowAnimationFade]; break; } } - (void)controllerDidChangeContent:(NSFetchedResultsController *)controller { [self.tableView endUpdates]; } I put breakpoints in each of these functions and found that only controllerWillChange is called. The exception is thrown before either controller:didChangeObject:atIndexPath:forChangeType:newIndex or controller:didChangeSection:atIndex:forChangeType are called. At this point I'm stuck. If I change my sectionNameKeyPath to just "dueDate" then everything works fine. I think that's because the dueDate attribute never changes whereas the category will be different when read back after the finishedDate attribute changes. Please help! UPDATE: Here is my UITableViewDataSource code: - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return [[self.fetchedResultsController sections] count]; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { id <NSFetchedResultsSectionInfo> sectionInfo = [[self.fetchedResultsController sections] objectAtIndex:section]; return [sectionInfo numberOfObjects]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } [self configureCell:cell atIndexPath:indexPath]; return cell; } - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { id <NSFetchedResultsSectionInfo> sectionInfo = [[self.fetchedResultsController sections] objectAtIndex:section]; return [sectionInfo name]; }

    Read the article

  • UIButton not getting touch events inside a custom UITableViewCell

    - by user210504
    Hi! I have designed a custom UItableView Cell in IB. This cell has a UIButton with an associated action. This button is not getting touch events, however the cell itself gets the events when called. What could I be doing wrong here. +--------------------------------+ | +----------+ | Cell | Button | | +----------+ +--------------------------------+ When I tap on the Button tableviewcell gets the events. What could be wrong? EDIT: I just checked, that UIButton is also getting touch events, but so is the UITableViewCell. And at then end of it the action associated with UIButton is not getting called.

    Read the article

  • Is there a way of providing a final transform method when chaining operations (like map reduce) in underscore.js?

    - by latentflip
    (Really strugging to title this question, so if anyone has suggestions feel free.) Say I wanted to do an operation like: take an array [1,2,3] multiply each element by 2 (map): [2,4,6] add the elements together (reduce): 12 multiply the result by 10: 120 I can do this pretty cleanly in underscore using chaining, like so: arr = [1,2,3] map = (el) -> 2*el reduce = (s,n) -> s+n out = (r) -> 10*r reduced = _.chain(arr).map(map).reduce(reduce).value() result = out(reduced) However, it would be even nicer if I could chain the 'out' method too, like this: result = _.chain(arr).map(map).reduce(reduce).out(out).value() Now this would be a fairly simple addition to a library like underscore. But my questions are: Does this 'out' method have a name in functional programming? Does this already exist in underscore (tap comes close, but not quite).

    Read the article

  • Dropdowns don't work on webOS with PhoneGap?

    - by Steve Nay
    I'm trying to use a dropdown in a PhoneGap app I'm writing. It uses a simple <select>: <select> <option value="1">First</option> <option value="2">Second</option> </select> This works fine on Android and the iPhone (including behaving like a native drop-down would on those systems). However, it doesn't appear to work on webOS (neither the Palm Pre itself nor the emulator). The <select> displays properly on the screen, but when I tap on it, nothing happens--I'm not able to make a selection from the dropdown. Why might this be?

    Read the article

  • adding a UIScrollView as a superview of 2 UITextview

    - by Risma
    hi i have 2 textview in a viewcontroller. the 1st textview is not editable, but the 2nd is editable. i want to make both of them scroll in the same position and size when the keyboard is appear. I think i have to use UIScrollView as base of both of textview. And then i add the UIScrollView in xib (bot of textview are made in xib too). and this is the picture if this hierarchy : in the viewDidLoad method, i add this code : - (void)viewDidLoad { [super viewDidLoad]; [scrollTextView addSubview:lineNumberTextView]; [scrollTextView addSubview:_codeTextView]; [lineNumberTextView bringSubviewToFront:scrollTextView]; [_codeTextView bringSubviewToFront:scrollTextView]; } but when i tap on the 2nd textview, the keyboard is not appear. What i have to do? thx for the advices

    Read the article

  • expandable and collapsable uitableviewcell

    - by Jayshree
    Hello everybody. I want to achieve something like an expand and collapse uitableviewcell. The part of collapsing and expanding on user tap has been achieved. but what i am looking for is the feature of showing more and less. that is when the uitableviewcell has not expanded to show full view, the word more shud be displayed. and when the uitableviewcell is expanded it shud show the word less at the end. So that whenever the user taps on more, then only the uitableview shud expand and vice versa. so any ideas of how i can do this. something like on webpages. when u click on more link it expands the area and lets u see entire content.

    Read the article

  • How do you keep Cocoa controllers from getting too big?

    - by zoul
    Hello! Do you have some tricks or techniques to break Cocoa controller classes into smaller chunks? I find that whatever I do the controllers end up being one of the more complicated classes in my design. The basic stuff is simple, but once I have several pop-overs or action sheets running, things get uncomfortably complex. It's not that bad, but still I would like to refactor the code into several standalone chunks. I thought about categories, but the code is not that independent (a lot of times it needs to tap into viewWillAppear, for example) and I find that I spend a long time fighting the compiler. I also thought about adding functionality in layers using inheritance, but that feels like a hack.

    Read the article

  • show activity indicator while loading ViewController

    - by Crystal
    I have a ViewController that takes time to load its views. When I run Instruments, I see from the home screen, if I tap on the icon that pushes that view controller onto the stack, it's half laying out the views, and half getting the data for the views. I tried adding an activity indicator to display on the home screen over the button when the button is pressed to push the LongRunningViewController onto the stack. So I basically do this: - (IBAction)puzzleView:(id)sender { dispatch_async(dispatch_get_main_queue(), ^{ [self.activityIndicator startAnimating]; }); PuzzleViewController *detailViewController = [[[PuzzleViewController alloc] init] autorelease]; [self.navigationController pushViewController:detailViewController animated:YES]; [self.activityIndicator stopAnimating]; }

    Read the article

  • Is there a way to get the current UIEvent being handled?

    - by not-
    I'm working in a class that is a delegate of another class; this other class is in a third-party library that I'd like to avoid changing if at all possible. The original class is handling a -touchesEnded event, and is delegating responsibility to me, but it doesn't pass the UIEvent itself to me. Is there a way to get a handle to the current event in progress? It's a double-tap handler, and all that is passed to me is the view being touched, and the point at which the touch occurred. I want to know exactly how many touches are involved in the event. Thanks! randy

    Read the article

  • Inter-project dependencies

    - by Mike Hordecki
    Hello! I'm doing some Delphi (2010) work this summer, and I've stumbled upon this problem: My project consists of reusable backend library and a bunch of GUIs that tap into its interface. In this circumstances I've decided to make the backend and GUIs separate projects within single project group (I hope my train of thought is correct). The problem is, how can I include units from the backend in a GUI project? I've tried to modify Project Options > Directories and Conditionals but compiler still complains about being unable to find proper .dcu's. Any ideas? Your help will be appreciated.

    Read the article

  • How to safely remove a USB drive on Windows CE 5.0?

    - by Radu C
    Until today, I assumed that Windows CE was writing everything to disk and I wouldn't end up with a broken FAT16 when I removed the USB stick. Today, I was proven wrong. I use a USB stick to test things on a WinCE 5.0 device. I don't write anything from the app or WinCE to the stick. I just execute my app, and my app reads its settings and pictures from the stick. Today, just this order of operations broke my stick filesystem (and I have to fix it). Is there a way to tell WinCE 5.0 to unmount the stick before I remove it? It sees it as a "Hard Drive", and the tap-and-hold menu has nothing along the lines of "safely remove drive". I'm happy with both code to do this operation and some trick that I didn't find in Windows CE yet. Thank you.

    Read the article

  • MKPinAnnotationView - hard to drag

    - by James Zaghini
    I have a MKPinAnnotationView that the user can drag around the map. It is very difficult for a user to drag the pin. I've tried increasing the frame size and also using a giant custom image. But nothing seems to actually change the hit area for the drag to be larger than default. Consequently, I have to attempt to tap/drag about ten times before anything happens. MKPinAnnotationView *annView = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"bluedot"] autorelease]; UIImage *image = [UIImage imageNamed:@"blue_dot.png"]; annView.image = image; annView.draggable = YES; annView.selected = YES; return annView; What am I missing here?

    Read the article

  • iOS sdk question: how do I cast a UIView to a UIImage View (alternativly how do I get a UIImageView from a GestureRecognzer?)

    - by user439299
    Desired end result: user taps a UIImageView and the image changes to another image (a subsequent tap returns the image to the original state) Problem: I add a (unique) selector to a bunch of UIImageViews (in an array) and point the action at the same function - let's call this function imageTapped: for now. Here is my code so far: -(void)imageTapped:(UITapGestureRecognizer *)tapGesture { UIImageView *view = tapGesture.view; // rest of code... } This code actually works fine but gets a warning when I run it: "Incompatible objective c types initilizing 'struct UIView *', expected 'struct UIImageView *' Any way to get rid of this? Not sure how casting works in objective c... primitive types seem to work fine such as (int)someFloat works fine but (UIImageView)someUiView doesn't work. Like I said, code works alright when I run it but would like to get ride of the compiler warning. Any help would be awesome.... I am very new to objective c (or any non java language for that matter) so be gentle. Thanks in advance.

    Read the article

  • windows 7 (windows-system32-systemproperties.exe n) need programme elevation message

    - by mohammedjas
    hi, i have the issue with windows 7 32-bit professional, since this is a network computer, when i download or install something it was asking for admin password , i gave password, then its shows programme need elevation , after i gone to my computer-properties-advanced tap - again the same message displays as windows-system32-systempropertiesadvanced.exe need programme elevation .this same message showing in all eg: if i click to install something wind/sys32/isyspropertiesins.exe progrmme need elevation , also i was not able to add or change somthing in the computermanagement, user or group , says some error , even i logged in admin also,, please help me out with good soluton ..i am looking forward reply , as soon as possible. regards, mohmmed

    Read the article

  • Call other activities in an activity?

    - by Mohit Deshpande
    Say I have 2 activities (ActivityOne and ActivityTwo). How would I call ActivityTwo from ActivityOne? Then how would I return to ActivityOne from ActivityTwo? For example, I have a listview with all the contacts on the host phone. When I tap on a contact, another activity shows information and allows editing of that contact. Then I could hit the back button, and I would go back to the exact state that ActivityOne was in before I called ActivityTwo. I was thinking an Intent object, but I am not sure. Could someone post some code?

    Read the article

  • important question on Android 2.2

    - by poeschlorn
    Hi guys, I've just updated my nexus one to 2.2...now all of my (own and some from the market) apps throw exceptions and were closed... It's weird, in the app i'm developing atm, there it displays only my start page with buttons, but when i tap on one button to fire an intent to another activity my app gets closed with an exception. Yesterday before the update everything worked fine... The same thing in my emulator: I have two devices, one with API level 7 and one with level 8...Level 7 worked fine, but level 8 killed my app :( What is the problem and how can I solve this? I'm desperatly trying to get it working again :( I hope someone can help me fixing this

    Read the article

  • Why do apps from Android 2.1 stop working with 2.2?

    - by poeschlorn
    Hi guys, I've just updated my nexus one to 2.2. Now all of my (own and some from the market) apps throw exceptions and were closed. It's weird, in the app I'm developing atm, there it displays only my start page with buttons, but when I tap on one button to fire an intent to another activity my app gets closed with an exception. Yesterday before the update everything worked fine. The same thing in my emulator: I have two devices, one with API level 7 and one with level 8. Level 7 worked fine, but level 8 killed my app :( What is the problem and how can I solve this? I'm desperatly trying to get it working again :( I hope someone can help me fixing this

    Read the article

  • Is it possible to deploy a Ruby app on a plain clean Passenger setup?

    - by Folletto
    I'm thinking to something really similar on what you can do with mod_php: drop an application in some way inside Apache and making it run with Passenger, without adding anything inside httpd.conf (no vhost, nothing except the basic Passenger configuration). It's something very similar to Wordpress or many other frameworks: just unzip/svn checkout it inside a folder and run it. I know that it's possible with CGI and FCGI, but I'm wondering if it's also possible to tap in the speed of Passenger. I've tried fiddling with the Rack instructions on the official website trying to find a specific .htaccess and config.ru configuration, but nothing so far. I know it's not common, but... is it even possible?

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >