Search Results

Search found 3754 results on 151 pages for 'ios simulator'.

Page 76/151 | < Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >

  • TableView Background image going over cell textLabel

    - by Alex Trott
    Currently my tableview looks like this: as you can see, cell.textLabel and cell.detailTextLable both load this background, and i can't work out how to get them to stop loading the background, and for it only to be the backing on the cell. Here's my current code to change the cell: - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { [cell setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"tableCell.png"]]]; } How can i get round this problem? Thanks in advance.

    Read the article

  • How to increase Size of PhotoLibrary View in iPad?

    - by Shreedhar
    Folwing code is to pop photoLibrary videoPicker = [[UIImagePickerController alloc] init]; videoPicker.delegate = self; videoPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; videoPicker.mediaTypes = [NSArray arrayWithObjects:(NSString *) kUTTypeImage,(NSString *)kUTTypeMovie,nil]; videoPicker.allowsEditing = YES;; pop = [[UIPopoverController alloc]initWithContentViewController:videoPicker]; pop.popoverContentSize = CGSizeMake(500, 900); [pop setDelegate:self]; [pop presentPopoverFromRect:[sender frame] inView:self.view permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES]; [videoPicker release]; How to increase the photoLibrary view(width X height) on pop?

    Read the article

  • Download files with NSURL

    - by Ishwar
    I am trying to download a list of files from a ftp server using: NSURL *ftpUrl = [NSURL URLWithString:@"ftp://xxx:[email protected]"]; I HAVE to use FTP, so please do not recommend an alternative. I want to know how to get the list of files from the root directory and also navigate inside folders (of FTP server). P.S: I do not think external library would be required to accomplish such an easy task, but if I must, any recommendations would be appreciated. Thank You :)

    Read the article

  • UITableView cell selection disabled and UITableViewHeader Enabled

    - by andyPaul
    I am adding a my header view to self.tableView.tableHeaderView=headerView; This tableView has 10 cells. I want to disable the cell Selection but, headerView touch events must be enabled. To achieve this I added the following code: self.tableView.userInteractionDisabled=YES; self.headerView.userInteractionDisabled=NO; self.headerView.exclusiveTouch=YES; Where I am wrong? Basic idea of implementation is , If headerView is enabled then cell selection is disabled and vice-versa.

    Read the article

  • How to check in which position (landscape or portrait) os the iPhone now?

    - by Knodel
    I have an app with a tab bar, and nav controllers in each tab. When user shakes the device, a UIImageView appears as a child view in the nav controller. But the UIImageView must contain a special image, depending on the device's current orientation. If I write just - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation) if (interfaceOrientation == UIInterfaceOrientationPortrait|| interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) { //Code } else if (interfaceOrientation == UIInterfaceOrientationLandscapeRight||interfaceOrientation == UIInterfaceOrientationLandscapeLeft) { //Code } } The view just goes crazy if user rotated the device before shaking. Is there a method to get iPhones current orientation?

    Read the article

  • Use pushViewController within app Delegate

    - by FMT
    Hi there i want to use this code within the app delegate ChatController *chatController = [[AppDelegate appDelegate] instantiateViewControllerWithIdentifier:@"GroupController"]; chatController.targetUserid = userid; [self.navigationController pushViewController:groupChatController animated:YES]; how can i push viewcontroller from appdelegate i mean make the above code work cuz self.navigationcontroller doesnt work :$

    Read the article

  • Pass NSURL from One Class To Another

    - by user717452
    In my appDelegate in didFinishLaunchingWithOptions, I have the following: NSURL *url = [NSURL URLWithString:@"http://www.thejenkinsinstitute.com/Journal/"]; NSString *content = [NSString stringWithContentsOfURL:url]; NSString * aString = content; NSMutableArray *substrings = [NSMutableArray new]; NSScanner *scanner = [NSScanner scannerWithString:aString]; [scanner scanUpToString:@"<p>To Download the PDF, " intoString:nil]; // Scan all characters before # while(![scanner isAtEnd]) { NSString *substring = nil; [scanner scanString:@"<p>To Download the PDF, <a href=\"" intoString:nil]; // Scan the # character if([scanner scanUpToString:@"\"" intoString:&substring]) { // If the space immediately followed the #, this will be skipped [substrings addObject:substring]; } [scanner scanUpToString:@"" intoString:nil]; // Scan all characters before next # } // do something with substrings NSString *URLstring = [substrings objectAtIndex:0]; self.theheurl = [NSURL URLWithString:URLstring]; NSLog(@"%@", theheurl); [substrings release]; The console printout for theheurl gives me a valid URL ending in .pdf. In the class I would like to load the URL, I have the following: - (void)viewWillAppear:(BOOL)animated { _appdelegate.theheurl = currentURL; NSLog(@"%@", currentURL); NSLog(@"%@", _appdelegate.theheurl); [worship loadRequest:[NSURLRequest requestWithURL:currentURL cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:60.0]]; timer = [NSTimer scheduledTimerWithTimeInterval:(1.0/2.0) target:self selector:@selector(tick) userInfo:nil repeats:YES]; [super viewWillAppear:YES]; } However, both NSLogs in that class come back null. What am I Doing wrong in getting the NSURL from the AppDelegate to the class to load it?

    Read the article

  • Listing documents directory contents in UITableView

    - by user1493543
    So I've researched extensively on how to list the files in the documents directory in a table view and after much deliberation, came up with this code. Whenever I run this, the app crashes with EXEC_BAD_ACCESS. I've been busting my head for hours, so any help would be appreciated. All I'm doing is acquiring the files in the documents directory and trying to list them in a table view... Code is pasted in link below. http://pastie.org/4178767 Edit- App crashes in numberOfRowsInSection: method.

    Read the article

  • collapsing a UITableView

    - by Sage Washabaugh
    Hey everyone I made a UITableView in my app and when a cell is touched it expands the problem I am having is it does not collapse no matter what I have tried, I'm sure its something easy i just cant figure it out the only time it does collapse is when it another cell is tapped. Here is my code: -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { selectedCellIndexPath = indexPath; [tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationNone]; if (selectedCellIndexPath) { selected = YES; } } -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { if(selectedCellIndexPath != nil && [selectedCellIndexPath compare:indexPath] == NSOrderedSame) return 150; return 44; }

    Read the article

  • Add a hidden view above a UITableView that is only displayed when TableView is scrolled up

    - by noncogitas
    Goal/Situation: I currently have a UIView in the TableView header. I am trying to add another UIView (which contains two Buttons and a few TextFields) that will sit above the TableView header. I would like the view to be displayed when the user scrolls up past the header (a la "pull to refresh"), and go away when the user presses a "done" button on the view. My two questions: 1) How do I add a view above the tableview header? 2) How do I display said view when a user has scrolled up past the header? 3) How do I dismiss said view when the user has pressed a button on said view?

    Read the article

  • Find the end/finish coordinates you a UISwipeGestureRecognizer

    - by Code
    I can find the start coordinates of where a swipe starts by doing the following - (void)oneFingerSwipeUp:(UISwipeGestureRecognizer *)recognizer { CGPoint point = [recognizer locationInView:[self view]]; NSLog(@"Swipe up - start location: %f,%f", point.x, point.y); } Is it possible to find the coordinates where the swipe ended? I looked into the docs and its not mentioned. Is there some work around for this? Many Thanks, -Code

    Read the article

  • Get current location using CLLocationCoordinate2D

    - by Mobility
    I am trying to get current location of user using CLLocationCoordinate2D. I want the values in the format like CLLocationCoordinate2D start = {-28.078694,153.382844 }; So that I can use them like following: NSString *urlAddress = [NSString stringWithFormat:@"http://maps.google.com/?saddr=%1.6f,%1.6f&daddr=%1.6f,%1.6f", start.latitude, start.longitude, destination.latitude, destination.longitude]; I used CLLocation *location = [[CLLocation alloc]init ]; CLLocationDegrees currentLatitude = location.coordinate.latitude; CLLocationDegrees currentLongitude = location.coordinate.longitude; to get current lat & long. But I am getting 0.000 for both when I try to test. I am testing on iPhone 4s. If there is any sample code, it will be great.

    Read the article

  • iPhone to Java EE remoting

    - by Justin Simonelis
    Hi there! I was looking for some opinions on the best remote method invocation practices when developing iPhone applications that communicate with Java (java EE) servers. Many iphone applications these days typically talk to a server back end. I typically prefer to write my servers in java using some Spring libraries. So far I have not found or stuck to a definitive practice for iphone-java server communication. What are some technical solutions and libraries that you have used to implement this kind of client-server communication? One thing I always keep in mind is that I want the communication protocols to be simple so that multiple platforms can be added for example, in future adding Android and possibly Blackberry clients, that can use the same protocol to talk to the server.

    Read the article

  • why i change the alpha value of UIImageView but no effect?

    - by chancy
    I am working on a reader app. when you read one magazine, it will display first five pages and download the rest pages one by one. there is a scrollview to view the thumbnail image of pages. At the beginning, if the page needs downloading, the corresponding thumbnail view's alpha value is set to 0.5. when the page is downloaded, i will update the thumbnail view's value to 1.0. I use one operation to download the page, and when one is downloaded i use delegate to set thumbnail view's alpha. But when i update thumbnail view's alpha value, it still the same as the beginning. it seems the alpha has no effect. I wonder is there anything wrong with my code? some snippets are as follows: In the PageViewController.m - (void)downloadPages { DownloadOperation *op = [[DownloadOperation alloc] initWithMagazine:magazine]; op.delegate = self; [[(AppDelegate *)[[UIApplication sharedApplication] delegate] sharedOperationQueue] addOperation:op]; } - (void)downloadOperation:(DownloadOperation *)operation finishedAtIndex:(NSUInteger)index { if (thumbScrollView){ [thumbScrollView viewWithTag:THUMBVIEW_OFFSET+index].alpha = 1.0; } } In DownloadOperation.m - (void)main { // ... NSUInteger index = 0; for (Page *page in mMagazine.pages) { if (/*page doesn't exist*/){ // download the page; if ([delegate respondsToSelector:@selector(downloadOperation:finishedAtIndex:)]) { [delegate downloadOperation:self finishedAtIndex:index]; } } index++; } }

    Read the article

  • does Apple allow template style apps to pass review?

    - by user1159677
    I have an app which will go to our clients and then they can have their clients install it. Meaning there would be multiple versions of the master app but with customization per client. example 200 of our clients get the master app and then can customize it (text and images only via web) Will Apple allow something like this? Is there another way to get around this distribution model? I guess a good example of it would be a real estate agent having an app that's customized and on the app store but it's still Brand XYZ's app. thanks in advance

    Read the article

  • how can i show ccessarychecked cell values in alertbox

    - by adnan
    i have created uitableview and cell in uitableview are accessarychecked . i have implemented an action named -(IBAction) checkBoxClicked . what i need is that i wanted to show accessarychecked cell values in alertbox when i click on button this is the code which i have written #import "ViewController.h" @implementation ViewController @synthesize cell; - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 7; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { cell= [tableView dequeueReusableCellWithIdentifier:@"cell"]; if (cell == nil) { cell = [[ UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"]; } cell.textLabel.text = [myarray objectAtIndex:indexPath.row]; /* NSString *imagefile = [[NSBundle mainBundle] pathForResource:@"cellimage" ofType:@"png"]; UIImage *ui = [[UIImage alloc] initWithContentsOfFile:imagefile]; cell.imageView.image = ui;*/ NSString *check = [[NSBundle mainBundle] pathForResource:@"checkbox_not_ticked" ofType:@"png"]; UIImage *bi = [[UIImage alloc] initWithContentsOfFile:check]; cell.imageView.image = bi; cell.accessoryType = UITableViewCellAccessoryNone; return cell; [cell release]; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { cell = [tableView cellForRowAtIndexPath:indexPath]; if (cell.accessoryType == UITableViewCellAccessoryNone) { cell.accessoryType = UITableViewCellAccessoryCheckmark; } else { cell.accessoryType = UITableViewCellAccessoryNone; } } -(IBAction) checkBoxClicked { NSArray *array = [[NSArray alloc] initWithArray:[myarray objectAtIndex:cell.accessoryType]:UITableViewCellAccessoryCheckmark]; if (array.cell.accessoryType == UITableViewCellAccessoryCheckmark) { UIAlertView *msg = [[ UIAlertView alloc] initWithTitle:@"selected items are given: " message:array delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil ]; [msg show ]; [msg release]; [myarray release]; } } //-(IBAction)checkBoxClicked{} - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } #pragma mark - View lifecycle - (void)viewDidLoad { myarray = [[NSArray alloc] initWithObjects:@"mondey",@"tuesday", @"wednesday",@"thursday",@"friday",@"saturday",@"sundey", nil]; [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. } - (void)viewDidUnload { [myarray release]; [super viewDidUnload]; // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; } - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; } - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; } - (void)viewDidDisappear:(BOOL)animated { [super viewDidDisappear:animated]; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); } @end

    Read the article

  • how to change the image on click from database

    - by iosdev
    In my application i having multiple image in sq lite database,Since i want to change to the next image on button click,Here my code, -(void)Readthesqlitefile:(NSInteger *)sno { sqlite3 *database;//database object NSString *docpath=[self doccumentspath];//get sqlite path const char *ch=[docpath UTF8String];//string to constant char UTF8string main part to connect DB if (sqlite3_open(ch, &database)==SQLITE_OK) { const char *chstmt="SELECT * FROM animal where rowid= = %d",sno; sqlite3_stmt *sqlstmt;//to execute the above statement if (sqlite3_prepare_v2(database, chstmt, -1, &sqlstmt, NULL)==SQLITE_OK) { while (sqlite3_step(sqlstmt)==SQLITE_ROW) { const char *Bname=(char *)sqlite3_column_text(sqlstmt, 0); //converting const char to nsstring NSString *Bndname=[NSString stringWithFormat:@"%s",Bname]; NSLog(@"Brand Names=%@",Bndname); lb1.text=[NSString stringWithFormat:Bndname]; NSUInteger legnt=sqlite3_column_bytes(sqlstmt, 1); if (legnt>0) { NSData *dt=[NSData dataWithBytes:sqlite3_column_blob(sqlstmt, 1) length:legnt]; clsimg=[UIImage imageWithData:dt];//converting data to image imager.image=clsimg; } else { clsimg=nil; } } } sqlite3_finalize(sqlstmt); } sqlite3_close(database); } Button click function -(IBAction)changenext { int j; for (j=1; j<10; j++) { [self Readthesqlitefile:j]; } } its is not working pls help me to solve it out?

    Read the article

  • One Common View In Every ViewController

    - by l3v
    I am having a hard time wording this when searching the internet so I am just going to ask the question. I have an options view in my app that slides into view when the user clicks a button. This options view will display app information like settings. I want this options view to be displayed on every view controller in my app. I do not want to copy and paste the code for the options view into every viewcontroller file. The options view has quite a few outlets and actions and also calls many delegates. How can I reuse this options view in all my view controllers without adding all the outlets, actions, and delegate methods each time? I was going to make a new file with public methods, but I would still have to copy the outlets. Would this public methods file have to include delegate methods as well then? Let me know if my question does not make sense. I am hoping there is a standard way of implementing something like this.

    Read the article

  • I have submitted app to app store and app status came like 'Metadata Rejected' and following review status. I do not have login page

    - by user3717465
    We began the review of your app but are not able to continue because we need a demo account to fully access your app features. Please provide demo account details in the Review Notes section of the Version Information for your app. Please ensure that the information you provide includes any data necessary to demonstrate the functionality of your app features. You can provide demo account information, including passwords, in the Review Notes section of your iTunes Connect App Information. While your iTunes Connect Application State shows as Metadata Rejected, we don't require a new binary to correct this issue. Please visit iTunes Connect, Manage Your Applications. Select your app, then click View Details of the desired version. Click the Edit button next to Version Information to edit the Review Notes for your app, then click "Save". how to correct the meta data. because i do not have login account.

    Read the article

  • Rendering CALayer in context uses large amounts of memory

    - by Otium
    I am taking a snapshot of a UIWebView layer, but when I render the webview's layer in the current context my app uses 10mb more memory, and I don't think that should be right. Here is my current code: CGSize imageSize = self.bounds.size; UIGraphicsBeginImageContextWithOptions(imageSize, YES, 0); CGContextRef context = UIGraphicsGetCurrentContext(); [self.layer renderInContext:context]; _snapshot = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();

    Read the article

  • Downloading image from server without file extension (NSData to UIImage)

    - by Msencenb
    From my server I'm pulling down a url that is supposed to simply be a profile image. The relevant code for pulling down the image from the urls is this: NSString *urlString = [NSString stringWithFormat:@"%@%@",kBaseURL,profile_image_url]; profilePic = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:urlString]]]; My url is in the format (note no file extension on the end since its dynamically rendered) localhost:8000/people/1/profile_image If I load the url in my browser the image displays; however the code above for pulling down the UIImage does not work. I've verified that the code does pull an image from a random site on the interwebs. Any thoughts on why this is happening?

    Read the article

  • The SVG text node disappear after change its text content

    - by sureone
    svg: <text xml:space="preserve" y="228" x="349.98" text-anchor="middle" stroke-width="0" stroke-linejoin="null" stroke-linecap="null" stroke-dasharray="null" stroke="#000000" fill="#000000" style="cursor: move; pointer-events: inherit;" font-size="24" font-family="serif" id="cur_b">cur_b</text> <text xml:space="preserve" y="222" x="103.98" text-anchor="middle" stroke-width="0" stroke-linejoin="null" stroke-linecap="null" stroke-dasharray="null" stroke="#000000" fill="#000000" style="cursor: move; pointer-events: inherit;" font-size="24" font-family="serif" id="cur_a">cur_a</text> <text xml:space="preserve" y="229" x="590.0211" text-anchor="middle" stroke-width="0" stroke-linejoin="null" stroke-linecap="null" stroke-dasharray="null" stroke="#000000" fill="#000000" style="cursor: move; pointer-events: inherit;" font-size="24" font-family="serif" id="cur_c">cur_c</text> NSString* theJS = @ "var theNode0 = document.getElementById('cur_a'); theNode0.textContent='200A'; theNode0.setAttribute('fill','#FF0000'); var theNode1 = document.getElementById('cur_c'); theNode1.textContent='200A'; theNode1.setAttribute('fill','#00FF00');" [self.webView stringByEvaluatingJavaScriptFromString:theJS]; The SVG text node value is changed but disappeared after about one second.

    Read the article

  • Trouble accessing Mutable array

    - by Jared Gross
    Im having trouble with my for loop where I am trying to index user names. I am able to separate my original array into individual objects but am not able to send the value to a new array that I need to reference later on. The value and count for userNames in my self.userNamesArray = userNames; line is correct. But right after that when I log self.userNamesArray, I get (null). Any tips cause I'm not completely sure I'm cheers! .h @property (nonatomic, copy) NSMutableArray *userNamesArray; .m - (void)viewWillAppear:(BOOL)animated { self.friendsRelation = [[PFUser currentUser] objectForKey:@"friendsRelation"]; PFQuery *query = [self.friendsRelation query]; [query orderByAscending:@"username"]; [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { if (error) { NSLog(@"Error: %@ %@", error, [error userInfo]); } else { self.friends = objects; NSArray *users = [self.friends valueForKey:@"username"]; NSLog(@"username:%@", users); //Create an array of name wrappers and pass to the root view controller. NSMutableArray *userNames = [[NSMutableArray alloc] initWithCapacity:[self.friends count]]; for (NSString *user in users) { componentsSeparatedByCharactersInSet:charSet]; NSArray *nameComponents = [user componentsSeparatedByString:@" "]; UserNameWrapper *userNameWrapper = [[UserNameWrapper alloc] initWithUserName:nil nameComponents:nameComponents]; [userNames addObject:userNameWrapper]; } self.userNamesArray = userNames; NSLog(@"userNamesArray:%@",self.userNamesArray); [self.tableView reloadData]; } Here's the code where I need to reference the self.userNamesArray where again, it is comping up nil. - (void)setUserNamesArray:(NSMutableArray *)newDataArray { if (newDataArray != self.userNamesArray) { self.userNamesArray = [newDataArray mutableCopy]; if (self.userNamesArray == nil) { self.sectionsArray = nil; NSLog(@"user names empty"); } else { [self configureSections]; } } }

    Read the article

  • Will releasing an iPhone app makes it available for iPad by default?

    - by agro1986
    In my XCode's Targets summary screen, the "Devices" drop down is set to "iPhone" (other possible values are iPad and Universal) because I haven't fine tuned the app's UI for iPad. However, will people be able to download and run my app from the iPad in non-fullscreen? (e.g., with black border surrounding most of the screen) I want people to be able to search for it in app store, install it, and run it even though it is not full screen. Thanks a lot

    Read the article

  • how can I read only one value of my dictionary?

    - by Gianfranco Cotumaccio
    I created my own dictionary by taking the values ??from a json file in the dictionary I have a set of values??, the other can take them and use them, instead of these start with a brace can not seem to get them: weather = ( { description = "broken clouds"; icon = 04d; id = 803; main = Clouds; } ); Use this command to take the values ??in the Dictionary: NSString *currweather = myDict[@"weather"][@"main"]; The application quits when the launch. How can I fix?

    Read the article

< Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >