Search Results

Search found 15682 results on 628 pages for 'iphone'.

Page 158/628 | < Previous Page | 154 155 156 157 158 159 160 161 162 163 164 165  | Next Page >

  • help in selecting a row in a tableview and pushing that row into anotherview? sturgling on this sinc

    - by Madhu
    Hi, I have a list of about 5 items in a tableview which I bought them from a database and now when i am trying to push each of them into different views in DidSelectRow() what I am seeing is it is showing me all the views in all the categories.... here is the code I have written.... Here is the code written in cell for row at indexpath: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } BeautyQuotes *bQuote = (BeautyQuotes*)[mBeautyQ objectAtIndex:indexPath.row]; cell.textLabel.text = bQuote.qBeauty; [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator] ; return cell; and in didselectrow() i have written this code: id count1 = [mBeautyQ count]; while (count1--) { object = [mBeautyQ objectAtIndex:count1]; } [mBeautyQ release]; if([[object objectAtIndex:indexPath.row] isEqual : @"Beauty Quotes"]){ [tableView deselectRowAtIndexPath:indexPath animated:NO]; BeautysubViewController *subBeauty = [[BeautysubViewController alloc] initWithNibName:@"BeautysubViewController" bundle:nil]; //subBeauty.selected =[regions objectAtIndex:indexPath.row];(this is not working) [subBeauty setTitle:@"Beauty Quotes"]; NSLog(@"it is about push beauty subview controller"); [self.navigationController pushViewController:subBeauty animated:YES]; [subBeauty release]; } in this way i am pusing all the rows in to different views....but when I am pushing this into beautyquotes it is showing me all other views along with this.... struggling on this a lot please help me in dealing with this....

    Read the article

  • Guide me on UIDevice currentDevice

    - by barbgal
    I am using the following code to set the device orientaion [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight]; when i used i got the warning and i found the below code to fix that warning. @interface UIDevice (MyPrivateNameThatAppleWouldNeverUseGoesHere) - (void) setOrientation:(UIInterfaceOrientation)orientation; @end Now what i would like to know is ... Can the app store accepts this code to be in an application? Thanks for any help!.

    Read the article

  • Reducing the space between sections of the UITableView.

    - by flohei
    Hi there, is there a way to reduce the space between two sections of a UITableView? There are about 15 pixel between every single section I have. I did already try to return 0 for -tableView:heightForFooterInSection: and -tableView:heightForHeaderInSection: but that doesn't change anything. Any suggestions? Thanks in advance. –f

    Read the article

  • Finding user location before map loads

    - by 4thSpace
    I'm trying to find the user's location using: CLLocationCoordinate2D _location; CLLocation *userLoc = nil; if(appDelegate.clLocationManager.locationServicesEnabled){ userLoc = mapView.userLocation.location; _location = userLoc.coordinate; } The problem is that I haven't yet initialized the map so the above doesn't work. Is there a way to get the user's location without using mapkit? Or should I be using a different technique?

    Read the article

  • How to run a long task in backgroung in iOS applications?

    - by John Canady
    I am developing an application which requires running a task in background. I am trying this by calling a method which will retrieve(download) data from web server through web services. this method will call some more methods which are in different view controller classes. Here when I tap on home button of device, the method is calling but no further execution of the remaining code. This is the code I have written in (void)applicationDidEnterBackground:(UIApplication )application { UIApplication app = [UIApplication sharedApplication]; UIBackgroundTaskIdentifier bgTask = 0; bgTask = [app beginBackgroundTaskWithExpirationHandler:^{ [app endBackgroundTask:bgTask]; bgTask = UIBackgroundTaskInvalid; }]; // Start the long-running task and return immediately. dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ // Do the work associated with the task. NSString *updatekey = [[NSUserDefaults standardUserDefaults] objectForKey:@"updatesetting"]; if([updatekey isEqualToString:@"enabled"]) { DataSettingsView *periodicUpdate = [[DataSettingsView alloc] init]; [periodicUpdate updateDataPeriodically]; //[periodicUpdate viewDidLoad]; //[periodicUpdate release]; } [app endBackgroundTask:bgTask]; bgTask = UIBackgroundTaskInvalid; }); } some one please help me in this background execution of long tasks with some example of code. Some help will appreciated and helpful to me.

    Read the article

  • Unable to dismiss MFMailComposeViewController, delegate not called

    - by Rod
    HI, I am calling MFMailComposeViewController from UITableViewController. Problem is, delegate method mailComposeController:(MFMailComposeViewController)controllerdidFinishWithResult* is never called when I select Cancel or Send button in Mail compose window. Here is the table view class: @implementation DetailsTableViewController - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.section==0 && indexPath.row==4){ //SEND MAIL MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init]; controller.mailComposeDelegate = self; if ([MFMailComposeViewController canSendMail]) { [controller setSubject:[NSString stringWithFormat:@"Ref %@",[item objectForKey:@"reference"]]]; [controller setMessageBody:@" " isHTML:NO]; [controller setToRecipients:[NSArray arrayWithObject:[item objectForKey:@"email"]]]; [self presentModalViewController:controller animated:YES]; } [controller release]; } } - (void)mailComposeController:(MFMailComposeViewController*)controllerdidFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { // NEVER REACHES THIS PLACE [self dismissModalViewControllerAnimated:YES]; NSLog (@"mail finished"); } The application don't crash. After Cancel or Send button is presses Compose Window stays on the screen with buttons disabled. I can exit application pressing Home key. I am able to open other Modal Views form TableView but not MailCompose.

    Read the article

  • Create an Edit view similar to Contacts App

    - by Daniel Granger
    I have an edit view in my app which is a instance of UITableViewController and contains one cell with a textfield in a grouped table. At the moment this cell is at the top of the screen and is firstResponder so they keyboard is visible as well. But in all the Apples apps like the Contacts App when you edit a piece of information like an Email it buts both of its rows in the middle between the Nav Bar and the Keyboard not at the top of the screen. How do I achieve this effect? Many Thanks

    Read the article

  • DrawRect in CPLayerHostingView?

    - by senthilmuthu
    0 Hi, i am using Core-plot . but when i declare the normal UIView as CPLayerHostingView,how can i handle drawRect of that view , i cant give another custom UIview name and write code in drawRect of that view?please any help to handle drawRect of CPLayerHostingView?

    Read the article

  • opening iWorks documents in iPad UIWebView

    - by user369156
    Hello, I'm writing an iPad application that has a UIWebView which I open word and excel documents in, but I want the user to be able to import those documents into the iWorks applications, Pages and Numbers, just like how you can do it in Safari if you open a document. If you open a document in Safari on the iPad, there'll be a button on the top bar that says "Open in..." and you can choose applications to open in. You get the top bar to appear by tapping on middle of the page. So is there an option you can set to allow UIWebView to show up the bar and automatically detect the content type and populate the list with applications you can import in? Or do I have to build this myself? And if I have to build my own, how do I open URLs to import documents into Pages and Numbers etc? Thanks, -David

    Read the article

  • Converting &amp; to & in Objective-C

    - by nbojja
    Hi All, I have a URL string in the following format. http://myserver.com/_layouts/feed.aspx?xsl=4&amp;web=%2F&amp;page=dda3fd10-c776-4d69-8c55-2f1c74b343e2&amp;wp=476f174a-82df-4611-a3df-e13255d97533 I want to replace &amp; with & in the above URL. My result should be: http://myserver.com/_layouts/feed.aspx?xsl=4&web=%2F&page=dda3fd10-c776-4d69-8c55-2f1c74b343e2&amp;wp=476f174a-82df-4611-a3df-e13255d97533 Can someone post me the code to get this done? Thanks

    Read the article

  • queued view updates not happening when performSelector afterDelay:0 used

    - by JosephH
    Hi all, I have an app that performs some calculations based on data arriving on a socket or local user interaction. I want to show an 'activity spinner' whilst the calculation happens. spinner = [[UIActivityIndiactorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; [spinner setCenter:self.view.center]; [self.view addSubview:spinner]; [spinner startAnimating]; [self performSelector:@selector(doCalcs) withObject:nil afterDelay:0]; This works well, except in the case where the code is run as a result of a message arriving over the network. I'm using http://code.google.com/p/cocoaasyncsocket/ to handle sockets and the code is running in the onSocket:didReadData:withTag: method. 'doCalcs' takes a few seconds. The spinner doesn't appear whilst it's running. If I change afterDelay:0 to afterDelay:1 then the spinner does appear the whole time doCalcs is running, but with the downside that it takes an extra second. So it seems the code is all correct, but for whatever reason the spinner isn't getting a chance to get on screen before doCalcs runs. Any suggestions would be most welcome.

    Read the article

  • UIViewController takes up entire screen in Interface Builder

    - by Sheehan Alam
    I have a NIB with a UIView that contains some UILabels, UIButtons etc. and a UIViewController that is loading a detached NIB. I want the UIViewController to be positioned below my UIView, but whenever I add it in Interface Builder it takes up the whole screen, and my UIView becomes part of the UIViewController. How can I make sure UIViewController appears below the UIView?

    Read the article

  • viewWillAppear for subviews

    - by nan
    I have UIScrollView with multiple UIVIew subviews. I would like to update the data that is displayed by each UIView when they appear in the visible portion of the UIScrollView. What is the callback that gets triggered? I tried viewWillAppear, but it does not seem to get called. Thanks. :)

    Read the article

  • jqtouch - panels appear on page, class="back" not working in Safari

    - by user564816
    I'm trying to get a demo working that was used in J. Stark's webinar on Safari Books Online (still available for viewing). I think I've followed the code example correctly, but the class="back" objects used to return from the "blog", "contacts", "settings" and "about" panels do not work, though the correct address shows in the nav area at the base of the browser window when I hover the mouse over the respective link. The panels-- which should slide in and out when called by their respective class"arrow" elements-- appear on the main page, nor do they animate correctly. Browser is Safari 5.0.3(6533.19.4); jquery-1.3.2; jqtouch freshly downloaded from the jqt website. Obviously I'm missing something simple. I'd sincerely appreciate anyone's help who sees what I'm doing wrong. Thanks for considering my question. View the app and source code (use view source in your browser) here. Sat 8 January 2011: 1 48 AM UPDATE in response to JS's comments: Most humble thanks for your note. Didn't want to impose on your server, so the URL for jqtouch.min.css points to a version on my server @ fastermac.net. There's something further amiss, I believe. On load, page still shows the elements that should be invisible until called by clicking class="arrow" elements. Animations not yet wiggling. Did get them to wiggle at one point, but "flip," for instance, landed then on a black page-- not the targeted panel. Probably something obvious, but I'm missing it after some considerable due diligence. Again, thanks for your note. Any further illumination would be sincerely appreciated.

    Read the article

  • Is there a way to detect non-movement (touch events) ?

    - by hyn
    Is there a way to detect a finger's non-movement by using a combination of UITouch events? The event methods touchesEnded and touchesCancelled are only fired when the event is cancelled or the finger lifted. I would like to know when a touch has stopped moving, even while it is still touching the screen.

    Read the article

  • UISegmentedControl - how to toggle between 2 UITableViews

    - by embedded
    I have a tab bar based application. What is the best way to toggle between 2 different UITableView views? Should I use a wrapper view and add those 2 views to it and depending on which segment was chosen I will show the correct view? Using only one tableView will not work because the layout is different between those 2 tableviews. Thanks

    Read the article

  • How can I make text in a UILabel non-centered?

    - by Sheehan Alam
    I have a UILabel: descriptionLabel = [[UILabel alloc] initWithFrame:CGRectMake(200, 30, 130, 150)]; [descriptionLabel setFont:[Utils getSystemFontWithSize:14]]; [descriptionLabel setBackgroundColor:[UIColor clearColor]]; [descriptionLabel setTextColor:[UIColor whiteColor]]; descriptionLabel.numberOfLines = 0; descriptionLabel.lineBreakMode = UILineBreakModeWordWrap; [self addSubview:descriptionLabel]; If the text is only 1 line long it will appear in the middle of the label. Is there anyway I can have the text display from the top left corner of the label instead of the middle center?

    Read the article

  • How to invert arrow image placed before the first cell when tableview cells are swiped beyond first

    - by neha
    Hi all, In my application, I need to add this functionality that there should be an arrow image upside down placed before first cell and some text like "Pull down to refresh" and when user pulls the table beyond this then this arrow gets inverted and text changes to "Release to refresh" and when the user releases his finger, the data is refreshed and rows get added to that point So now this initial arrow and text moves upwards before the first cell again. Can anybody tell me wheather there's any event that does this? Or else which event I need to capture in order to add this functionality? Thanks in advance.

    Read the article

  • How to sort numbers in array from low to high

    - by Louie
    Hello all, I am trying to sort an array of prices from low to high. I have it working but not the way I want it to. Long story short, the sorter is putting numbers in order like this: 100 10900 200 290 instead of sorting like this 100 200 290 10900 here is my code I am doing this with. -(void)filterPriceLowHigh { NSSortDescriptor *sortDescriptor; sortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"ListPrice" ascending:YES] autorelease]; NSArray *sortDescriptors = [NSArray arrayWithObject:sortDescriptor]; NSArray *sortedArray; sortedArray = [app.vehiclesArrayToDisplay sortedArrayUsingDescriptors:sortDescriptors]; [app.vehiclesArrayToDisplay removeAllObjects]; [app.vehiclesArrayToDisplay addObjectsFromArray:sortedArray]; } Could someone tell me what I need to do here? thanks in advance.

    Read the article

  • Is it possible to Prevent TO fileld to be edit in MFMailComposeViewController

    - by mihirpmehta
    in my Application i am using MFMailComposeViewController for emails... I am Adding to Field in it programmaticly... I want To prevent user to edit the TO field, User can't change TO field's email address... I am not able to find neither i know if it is possible or not It is not necessary but still code is NSArray *arr = [NSArray arrayWithObject:Emailstr]; MFMailComposeViewController* controller = [[MFMailComposeViewController alloc] init]; controller.mailComposeDelegate = self; [controller setToRecipients:arr]; [controller [controller setMessageBody:@"Hello there." isHTML:NO]; [self presentModalViewController:controller animated:YES];

    Read the article

  • How do I get more control of UIImageView animation?

    - by Pickles
    I'm trying to display a series of images in a animation where the duration between the images changes frame to frame. I can successfully animate images where the duration is the same. I've looked into subclassing UIImageView but it doesn't seem to allow you access anything that could be helpful. I've also looked into subclassing UIView directly but it seems like I'd have to write a lot of the stuff that UIImageView already does for me. Is there a way to do this with UIImageView? Or if I am going to have to build my own UIView animation can someone point me the right direction to get started? Thanks.

    Read the article

< Previous Page | 154 155 156 157 158 159 160 161 162 163 164 165  | Next Page >