Search Results

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

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

  • UIButton At Run Time

    - by rami
    I want to create UIButton At Run Time. I Have main view in which I have Table View when I select Row it Open Sub View with Toolbar and in that I Click on Add Button on tool Bar it opens the another view in which I add My value(like name)now when I press save Button It goes back to the sub View with Toolbar and it create button with name which I save and add it in sub view But problem is when I do it again all things done well But The Button Which created previous is not seen in sub view.It display only button with name Which I save Last.

    Read the article

  • Customizing the post to facebook in Sharekit2.0

    - by laksh
    I have integrated the latest code in sharekit into my project. I am able to click in to go to the facebook and able to see the text i am going to post. The image looks like this: I would like to change two things. Firstly, I am not able to see the cancel or post button because of my app picture at top. So i would like to set the view to be scrollable. How do i change that? Secondly, I would like to remove the keyboard after i press return, or i want a way to remove the keyboard. Need some help on this..Thanks..

    Read the article

  • NSTimer won't stop it only resets when invalidated & released

    - by J Fries
    When I press my stop button to stop the timer it just resets to the original time and begins counting down again. I have looked everywhere and all I have found is "invalidate" and it isn't working. I want the time to stop when I hit stop and the label to display the original time. I also turned off automatic counting so I could try releasing and it is giving me an error: 0x10e20a5: movl 16(%edx), %edx EXC_BAD_ACCESS (code=2, address=0x10) `NSTimer *rockettTimer; int rocketCount; @interface FirstViewController () @property (strong, nonatomic) IBOutlet UILabel *rocketTimer; - (IBAction)stopButton:(id)sender; - (IBAction)startButton:(id)sender; @end @implementation FirstViewController @synthesize rocketTimer; -(void) rocketTimerRun{ rocketCount = rocketCount - 1; int minuts = rocketCount / 60; int seconds = rocketCount - (minuts * 60); NSString *timerOutput = [NSString stringWithFormat:@"%d:%.2d", minuts, seconds]; rocketTimer.text = timerOutput; } - (IBAction)startButton:(id)sender { rocketCount = 180; rockettTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(rocketTimerRun) userInfo:nil repeats:YES]; - (IBAction)stopButton:(id)sender { [rockettTimer invalidate]; //[rockettTimer release]; } - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. } - (void)viewDidUnload { [self setRocketTimer:nil]; [super viewDidUnload]; // Release any retained subviews of the main view. } - (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation { if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); } else { return YES; } } @end`

    Read the article

  • I am getting duplicates in UITableView, cellForRowAtIndexPath

    - by Martol1ni
    I am getting duplicates of my array, and wrongly displayed cells in this method: Here I am initializing the array, and adding it to the tableView: NSArray *sectionsArray = [NSArray arrayWithObjects: @"Location", @"Front Post", @"Front Fixing", @"Front Footplate", @"Rear Post", @"Read Fixing", @"Rear Footplate", @"Horizontal Bracing", @"Diagonal Bracing", @"Front Beam", @"Front Lock", @"Rear Beam", @"Rear Lock", @"Guard", @"Accessories", @"Comments", @"Off load ref", @"Loc Empty", @"Loc Affected", nil]; [_tableArray setObject:sectionsArray atIndexedSubscript:2]; [_tableView reloadData]; For some weird reason there are always the 4th object that is messed up, and is either duplicated, or do not have the views from IB. Here is the cellForRowAtIndexPath: method: - (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell; if (indexPath.section == 2) { cell = [tableView dequeueReusableCellWithIdentifier:@"EntryCell"]; cell.tag = indexPath.row; UILabel *label = (UILabel *)[cell viewWithTag:3]; [label setText:[[_tableArray objectAtIndex:2] objectAtIndex:indexPath.row]]; } return cell; } I have logged the string [[_tableArray objectAtIndex:2] objectAtIndex:indexPath.row], and it logs the right string.

    Read the article

  • how to aggregate information on UIImage?

    - by user1582281
    I want to draw on each drawing cycle 1000 more lines on my UIIMage, right now I do it by : -(void)drawRect { for(int i=0;i<1000;i++) { UIGraphicsBeginImageContext(myImage.size); code to draw line on current context... draw previous info from myImage: [myImage drawInRect:myRect]; //store info from context back to myImage myImage=UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); } //append the image on the right side of current context: [myImage drawInRect:myRightRect]; } problem is that I think that drawing entire image each time just for the few lines added is very expensive, anyone has any idea how to optimize it?

    Read the article

  • Get nested data from local JSON file

    - by Lbase
    Now that I have the NSDictionary object JSONDictionary, how do I get the nested data inside of it? NSString *JSONFilePath = [[NSBundle mainBundle] pathForResource:@"sAPI" ofType:@"json"]; NSData *JSONData = [NSData dataWithContentsOfFile:JSONFilePath]; NSDictionary *JSONDictionary = [NSJSONSerialization JSONObjectWithData:JSONData options:kNilOptions error:nil]; NSLog(@"Dictionary: %@", JSONDictionary); sAPI.json snippet: { "ss": [{ "name": "bl", }, "ls": [{ "name": "ML", "abbreviation": "ml", "id": 10,

    Read the article

  • Highlight cell after modalview has been dissmissed

    - by Trj
    I have a table view and a toolbar where items can be added to the table view. The addItemView is presented modally. Now, when i dismiss the modal view i would like to indicate which cell was added. For now i have used the setSelected and deselct methods on UITableView, but they are fired too quickly. What would be a good approach to give the user a good indication on which cell was added? Could i add a timer which prevented the setSelected method from firing right away?

    Read the article

  • How to post private message with Twitter API

    - by Venil Aminovich
    I want to send a private message to my followers with Twitter API (application is for iPhone). If I can do that with this API, please, give the code or the link to the code to me. Update: I've read the link dev.twitter.com/docs/api/1/post/direct_messages/new ACB gave me, and I understood the idea, how post direct messages. But the issue is there is no any word about autentification in this link. But I can't post tweet without autentification. Should I use TWRequest and set the account to this request? Thank you in advance!

    Read the article

  • How to reset buttons when using touchesBegan

    - by FireStorm
    When I use touchesBegan on my sprite kit game the buttons press down fine the first time but are unresponsive the second time, how do I "reset" these buttons if you will. Buttons are as follows: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint location = [touch locationInNode:self]; SKNode *node = [self nodeAtPoint:location]; if ([node.name isEqualToString:@"Button"]) { [self runAction:[SKAction playSoundFileNamed:@"sound" waitForCompletion: NO]]; .... Thanks for your help!

    Read the article

  • Is it possible to achieve string localization inside of a statically linked lib?

    - by user3696003
    I am working on building an SDK which will be built out as a statically linked library that third party applications can then drop in to their applications. Inside of this SDK, I was looking to be able to perform some "localization." Basically, I would like for the code in my SDK to be able to access some ".string" files to perform some string lookup and language translation capabilities. Then I could propagate these strings outward to implementing App layers through my exposed API's. Is this even possible? I thought it was but now that I have actually been trying, I am seriously having doubts.

    Read the article

  • UIButtons display differently on UIImageView when created at design time vs. run time

    - by PRITISH
    I have added some UIButton objects into .xib file, and some UIButton objects with the code. But now I am facing one problem. While Zooming the UIImageView the UIButtons that are added through code are shown on the UIImageView and those that are added with .xib file are below the UIImageView. Code for UIButtons added with code: btnBrightness = UIButton.FromType (UIButtonType.RoundedRect); btnBrightness.Frame = new RectangleF (540, 20, 95, 37); btnBrightness.SetTitle ("Brightness", UIControlState.Normal); More details: monotouch

    Read the article

  • Make UIViewController outside Navigation Controller

    - by user1447316
    i have a question for you. I'm working on this app that has a walkthrough/tutorial screens and also login ones. On each of this screens there is a button to skip this part and go directly to use the app, without completing the registration (you know, so that people can test it before signing-in). As you can see i'm using Storyboards. The NowPlaying04 ViewController is actually the app itself. Obviously, when the user will be a registered one, i should also be able to jump right back to that screen, skipping the walkthrough and signin process. The first question is: how is the best way to structure this? The second quesion is: how i can make a ViewController outside that Navigation controller. Cause as you can see now, the NowPlaying04 ViewController inherits the top navigation bar. Which is a thing that i don't want. I don't need that. I hope that you have understood my question. I'll appreciate any help. Programmatically or by dragging stuff around, i'm ok with all the solutions. The important thing is that it works correctly! :-)

    Read the article

  • How to move to another view without using a button

    - by Will
    My first view displays an image and action indicator while web-servers and database function are run in that background. I want the application to go to my tab view when the functions have been completed. How do I do this? Here is what the views look like. What I have tried: TabBarViewController *tab = [[TabBarViewController alloc]init]; [self presentViewController:tab animated:NO completion:nil]; and [self performSegueWithIdentifier:@"first" sender:self]; Please can you help my to understand how to do this. I have spent many hours googling this problem and couldn't work out how to do it. Thanks EDIT: Added Code

    Read the article

  • Currency Conversion and display fetched from Server

    - by user198725878
    I am fetching the in app purchase items for my app from my web server.the web-server gives the product title, description and price... Currently i am displaying the each product using the product title,description and price.Currently i am showing the currency in $. Now i am having the doubt that , can i display the prices as such?when i referred some URL, it seems that prices needs to be localized. So do i need to display the prices localized which is fetched from my-server? please let me know how should i proceed? Thanks a lot for stopping by..

    Read the article

  • EXC_BAD_ACCESS iPhone Development

    - by gkres121
    Sorry, this could be a simple fix, as I am new to iPhone Development. In my Delegate, after pressing the create profile button, the create profile view is pushed: -(void) createProfile_clicked:(id)sender { AddNewProfile *create = [[AddNewProfile alloc] init]; [self.window addSubview:create.view]; [self invisibleCreateProfileBar]; AddNewProfile *controller = [[AddNewProfile alloc] initWithNibName:@"AddNewProfile" bundle:[NSBundle mainBundle]]; [ self.navigationController pushViewController:controller animated:YES ]; currentController=controller; } Then in the AddNewProfile.m: - (IBAction)backgroundTap:(id)sender { if([nameField isFirstResponder]){ [nameField resignFirstResponder]; } if([ageField isFirstResponder]){ [ageField resignFirstResponder]; } if([doctorNameField isFirstResponder]){ [doctorNameField isFirstResponder]; } if([doctorNumberField isFirstResponder]){ [doctorNumberField resignFirstResponder]; } } This leads to a exc_bad_access error every time the FirstResponder is ever messed with, with any of my controls. I can select a control(text box), but once I click out of one, it crashes. Any help would be greatly appreciated.

    Read the article

  • Delegate Method only Firing after 5 or so Button Presses?

    - by CoDEFRo
    I'm having the most bizarre problem which I'm not even close to figuring out. I have a button which fires a delegate method. Once upon a time it was working fine, but after making some changes to my code, now the delegate method only fires after I push the button x amount of times (the changes I made to the code had nothing to do with the infrastructure that connects the delegate together). It varies, it can be 5 times to 10 times. I used the analyzer to check for memory leaks and there aren't any. There is too much code for me to paste here (I don't even know where to start or where the problem could be), but I'm wondering if anyone has experienced this problem before, or what could be causing it? This is very odd and have no clue what could be causing it.

    Read the article

  • xcode convert iPhone to iPad

    - by user1625435
    help please. my code that change UIImageView is: - (void) viewDidLoad { background.image = [UIImage imageNamed:@"myImage.png"]; } It works good on iPhone and also on iPad but, how can I change "myImage.png" to "myImageHD.png" when I will run this app on my iPad???? I just need to show myImageHD if my app will run on iPad. IT CAN BE DONE WITH XIB FILE, BUT I NEED WITH CODE TO FIX IT. To detect if app run on iPad, and show myImageHD. Thanks.

    Read the article

  • Singleton design potential leak

    - by iBrad Apps
    I have downloaded a library off of github and have noticed that in the main singleton of the library there is a possible leak in this bit of code: +(DDGameKitHelper*) sharedGameKitHelper { @synchronized(self) { if (instanceOfGameKitHelper == nil) { [[DDGameKitHelper alloc] init]; } return instanceOfGameKitHelper; } return nil; } Now obviously there is no release or autorelease anywhere so I must do it but how and in what way properly? I have looked at various Singleton design patterns on the Internet and they just assign, in this case, instanceOfGameKitHelper to the alloc and init line. Anyway how would I properly fix this? Thanks!

    Read the article

  • How can I get my app ready for the iPhone 5

    - by RazorSharp
    Apple just announced the iPhone 5 with a 4 inch screen and a 16:9 aspect ratio. Of course, they only give developers two weeks to scramble to update their apps without being able to test. I'd like to update my app for the iPhone 5's new big screen, but there's nothing on Apple's developer site about the iPhone 5 or making your apps ready for a larger screen. It would be a pain to have to write my own logic for testing whether the device is an iPhone 5 and then displaying a custom storyboard file for it. Does anyone know how the new sizing works or if there are any hidden Xcode for this?

    Read the article

  • How to make sure an action completes before you continue

    - by HurkNburkS
    I am trying to close a UIView thats in one method from another method by calling it, The UIView closes fine but not untill after all of the processes are finished in the current method. I would like to know if there is a way to force the first thing to happen first (i.e. close UIviews) then continue the current method? This is what my method looks like - (void)selectDeselectAllPressed:(UIButton*)button { int id = button.tag; [SVProgressHUD showWithStatus:@"Updating" maskType:SVProgressHUDMaskTypeGradient]; [self displaySelected]; // removes current view so you can load hud will not be behind it if (id == 1) { [self selectAllD]; } else if (id == 2) { [self deselectAllD]; } else if (id == 3) { [self selectAllI]; } else if (id == 4) { [self deselectAllI]; } } as you can see what happens is this method is called when a button is pressed, I would like for the displaySelected method to do what it needs to do before any of the other methods are called? Currently what happes when i debug this is displaySelected method is called the thread walks through that then continues to the if statment then after the method in the if statment has finished then displaySelected changes are made... its so weird. any help would be greatly appreciated.

    Read the article

  • How to add a multiline title bar in UINavigationController

    - by Cocoa Matters
    I have try to add a two line title bar in UINavigationController I want to adjust font size automatically set according to string length.My String max size goes to 60. I have try to implemented through following code UILabel *bigLabel = [[UILabel alloc] init]; bigLabel.text = @"1234567890 1234567890 1234567890 1234567890 1234567890 123456"; bigLabel.backgroundColor = [UIColor clearColor]; bigLabel.textColor = [UIColor whiteColor]; bigLabel.font = [UIFont boldSystemFontOfSize:20]; bigLabel.adjustsFontSizeToFitWidth = YES; bigLabel.clipsToBounds = NO; bigLabel.numberOfLines = 2; bigLabel.textAlignment = ([self.title length] < 10 ? NSTextAlignmentCenter : NSTextAlignmentLeft); [bigLabel sizeToFit]; self.navigationItem.titleView = bigLabel; It didn't work for me can you help me please. I have to made this for iPhone and iPad screen

    Read the article

  • Remove a ReactiveCocoa signal from a control

    - by dbarros
    If I assign a signal to a property of a control: RAC(self.loginButton.enabled) = [RACSignal combineLatest:@[ self.usernameTextField.rac_textSignal, self.passwordTextField.rac_textSignal ] reduce:^(NSString* username, NSString* password) { return @(username.length > 0 && password.length > 0); }]; But then wanted to assign a different RACSignal to enabled, how can I clear any existing one before doing so? If I try and set it a second time, I get an exception like the following: 2013-10-29 16:54:50.623 myApp[3688:c07] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Signal <RACSignal: 0x975e9e0> name: +combineLatest: ( "<RACSignal: 0x975d600> name: <UITextField: 0x10f2c420> -rac_textSignal", "<RACSignal: 0x975de30> name: <UITextField: 0x10f306e0> -rac_textSignal" ) reduce: is already bound to key path "self.loginButton.enabled" on object <LoginViewController: 0x10f264e0>, adding signal <RACSignal: 0x9763500> name: +combineLatest: ( "<RACSignal: 0x97624f0> name: <UITextField: 0x10f2c420> -rac_textSignal", "<RACSignal: 0x97629e0> name: <UITextField: 0x10f306e0> -rac_textSignal" ) reduce: is undefined behavior'

    Read the article

  • Adding the scrollview created by photoscroller to a subview

    - by wierddemon
    I'm trying to modify Apple's PhotoScroller example to make the scrollview that is created into a subview instead of it being a view that takes up the entire screen. Any ideas on how this can be accomplished? - (void)loadView { // Step 1: make the outer paging scroll view CGRect pagingScrollViewFrame = [self frameForPagingScrollView]; pagingScrollView = [[UIScrollView alloc] initWithFrame:pagingScrollViewFrame]; pagingScrollView.pagingEnabled = YES; pagingScrollView.backgroundColor = [UIColor blackColor]; pagingScrollView.showsVerticalScrollIndicator = NO; pagingScrollView.showsHorizontalScrollIndicator = NO; pagingScrollView.contentSize = [self contentSizeForPagingScrollView]; pagingScrollView.delegate = self; // When I do this it fails [self.view addSubview:pagingScrollView]; // Step 2: prepare to tile content recycledPages = [[NSMutableSet alloc] init]; visiblePages = [[NSMutableSet alloc] init]; [self tilePages]; }

    Read the article

  • How should I set up UITableViewCell subclasses with UIControls in them?

    - by GeneralMike
    I have a dynamically generated UITableView (so I have to use prototype cells, not static cells) with many cells on it. Each cell will have a UILabel on it. Additionally, each cell will also have at least one UIControl (as of right now, it could be a UITextfield or a UISegmentedControl, but I want to keep it flexible in case I add something else in the future). I'm going to need to be able to send the text in that label, and get either the text in the textfield, or the title of the selected segment index, etc. For the cells with multiple controls, I'm going to have to also let it know what control I'm interested in for that call. What would be the best way to set this up?

    Read the article

  • Trouble with ID in NSString

    - by useboot
    I am trying to create something interesting in my application. So, I created an UILabel and I want to output new value. So, my code. NSString *test = @"13"; self.UserAge.text = @"Your age is %@", test; But it doesn't work. In Console-Command Mode I can do it with NSLog(); My result is "Your age is %@". But I need to output "Your age is 13". What do I should do with name? Sorry, if my question is easy for you. I am beginner. :) Thank you everyone who will answer on my question.

    Read the article

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