Search Results

Search found 11 results on 1 pages for 'pbcoder'.

Page 1/1 | 1 

  • Moving UIButton around

    - by pbcoder
    I've tried to move a UIButton up and down in a menu. The problem I've got with the following solution is that the timer is not accurate. Sometimes the Button is moved up 122px, sometimes only 120px. How I can fix this? -(IBAction)marketTabClicked:(id)sender { if (marketTabExtended) { NSLog(@"marketTabExtended = YES"); return; } else { if (iPhoneAppsExtended) { timer = [NSTimer scheduledTimerWithTimeInterval:0.005 target: self selector: @selector(animateItemApps) userInfo: nil repeats: YES]; } else { if (homepageExtended) { timer = [NSTimer scheduledTimerWithTimeInterval:0.005 target: self selector: @selector(animateItemHomepage) userInfo: nil repeats: YES]; } else { timer = [NSTimer scheduledTimerWithTimeInterval:0.005 target: self selector: @selector(animateItemMarketing) userInfo: nil repeats: YES]; } } } [self performSelector:@selector(stopTimer) withObject:self afterDelay:0.605]; iPhoneAppsExtended = NO; homepageExtended = NO; marketTabExtended = NO; marketTabExtended = YES; } -(void)animateItemApps { CGPoint movement; movement = CGPointMake(0, -1); homepage.center = CGPointMake(homepage.center.x, homepage.center.y + movement.y); } -(void)animateItemHomepage { CGPoint movement; movement = CGPointMake(0, 1); homepage.center = CGPointMake(homepage.center.x, homepage.center.y + movement.y); //marketTab.center = CGPointMake(marketTab.center.x, marketTab.center.y + movement.y); } -(void)animateItemMarketing { CGPoint movement; movement = CGPointMake(0, -1); //marketTab.center = CGPointMake(marketTab.center.x, marketTab.center.y + movement.y); homepage.center = CGPointMake(homepage.center.x, homepage.center.y + movement.y); } -(void)stopTimer { [timer invalidate]; }

    Read the article

  • Problem with UITabBar + NavController in secondView viewDidLoad isn't called

    - by pbcoder
    My Application is a Tabbar with a navController in each of it's tabs. Now, the problem is to add a custom info button to the navController in the SecondView. I've created the App in InterfaceBuilder and entered the name of the nib to Load there. If I run my App now, the SecondView is shown, but the problem is, that the viewDidLoad is not called. http://www.freeimagehosting.net/image.php?9d8ed67dcc.png

    Read the article

  • How to load image form NSMutableArray

    - by pbcoder
    I want to load the image URL from my NSMutableArray. Here is my Code: id path = (NSString *)[[stories objectAtIndex: storyIndex] objectForKey: @"icon"]; NSURL *url = [NSURL URLWithString:path]; NSData *data = [NSData dataWithContentsOfURL:url]; UIImage *img = [[UIImage alloc] initWithData:data cache:NO]; If I use: id path = @"http://www.xzy.de/icon.png"; it´s all right, but not if I want to extract the imageURL from my Array Anyone who can help me? Thanks!

    Read the article

  • problem with presentModalViewController

    - by pbcoder
    If my iPad is in Landscape mode and presentModalViewController is called the view automatically turns into portrait mode. Any solutions? UIViewController * start = [[UIViewController alloc]initWithNibName:@"SecondView" bundle:nil]; start.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; start.modalPresentationStyle = UIModalPresentationFormSheet; [self presentModalViewController:start animated:YES]; In SecondView I've already added: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; }

    Read the article

  • jQuery plugin call internal function

    - by pbcoder
    I want to call removeSomething() (see in line 9) internally: JS-Code is: (function($){ $.fn.extend({ Engine: function(options) { var defaults = { ... }; var options = $.extend(defaults, options); removeSomething(); //----------------------------------------------------------------------- //Public Functions ------------------------------------------------------ //----------------------------------------------------------------------- this.removeSomething = function() { ... }; } }); })(jQuery); But if I call removeSomething console outputs that removeSomething is not a function, how do I have to call this function? The function should be available internally and externally. Thanks for help!

    Read the article

  • Syntax highlighting on iPhone Text-Editor

    - by pbcoder
    Hi, I want to write a simple text editor for iPhone with syntax highlighting support for c,c++. But the problem is, I dont't know how to do this. The first solution I was thinking about, was to go over the text and highlight keywords when the value of the UITextView has changed, but I think that if I got more than 1000lines of code that doesn't work very well. Thanks for help!

    Read the article

  • Access problem with NSMutableArray

    - by pbcoder
    Hi, my problem is that I can't access my NSMutableArray in - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {}. I create my NSMutableArray here: nodes = [xmlDoc nodesForXPath:@"/xml/items/item/short_desc" error:nil]; if (nodes != nil && [nodes count] >= 1) { for (int i = 0; i < [nodes count]; i++) { CXMLElement *resultElement = [nodes objectAtIndex:i]; result = [[[[resultElement attributeForName:@"data"] stringValue] copy] autorelease]; [short_desc addObject:result]; } } and I can print out the content of short_desc everywhere with: NSLog([short_desc objectAtIndex:0]); but not in: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { ..... NSString *date = [name objectAtIndex:0]; labelDate.text = date; ..... return cell;} if I use: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { ..... NSString *date = @"text..."; labelDate.text = date; ..... return cell;} it works correctly. ANY SOLUTION FOR THIS PROBLEM???

    Read the article

  • How to load image from NSMutableArray

    - by pbcoder
    I want to load the image URL from my NSMutableArray. Here is my Code: id path = (NSString *)[[stories objectAtIndex: storyIndex] objectForKey: @"icon"]; NSURL *url = [NSURL URLWithString:path]; NSData *data = [NSData dataWithContentsOfURL:url]; UIImage *img = [[UIImage alloc] initWithData:data cache:NO]; If I use: id path = @"http://www.xzy.de/icon.png"; it´s all right, but not if I want to extract the imageURL from my Array Anyone who can help me? Thanks!

    Read the article

  • getElementById does return null

    - by pbcoder
    I have following function: $('canvas').createWindow('xyz', 500, 600); And js-code behind is: var $ = function(element) { if (this.constructor !== $) { return new $(element); } alert(element); var windowObj = document.getElementById(element); this.createWindow = function(src, width, height) { if(width != "" && height != "") { windowWidth = windowObj.style.width = width + 'px'; windowHeight = windowObj.style.height = height + 'px'; } }; }; But the problem is that JS says windowObj is null, alert(element) works fine! Thanks for your help!

    Read the article

1