Search Results

Search found 15 results on 1 pages for 'flocked'.

Page 1/1 | 1 

  • How to enlarge dynamically an UILabel (label and font size)?

    - by Flocked
    Hello, Im currently working on an iPhone project. I want to enlarge dynamically an UILabel in Objective-C like this: How is this possible? I thought I have to do it with CoreAnimation, but I didn't worked. Here is the code I tried: UILabel * fooL = //[…] fooL.frame = CGRectMake(fooL.frame.origin.x, fooL.frame.origin.y, fooL.frame.size.width, fooL.frame.size.height); fooL.font = [UIFont fontWithName:@"Helvetica" size:80]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; [UIView setAnimationDelegate:self]; [UIView setAnimationDuration:0.5]; [UIView setAnimationBeginsFromCurrentState:YES]; fooL.font = [UIFont fontWithName:@"Helvetica" size:144]; //bigger size fooL.frame = CGRectMake(20 , 44, 728, 167); //bigger frame [UIView commitAnimations]; The problem with this code is that it doesn't change the fontsize dynamically.

    Read the article

  • App crashes often in a for-loop

    - by Flocked
    Hello, my app crashes often in this for-loop: for (int a = 0; a <= 20; a++) { int b = arc4random() % [newsStories count]; NSString * foo = [[NSString alloc]initWithString:[[newsStories objectAtIndex: arc4random() % b]objectForKey:@"title"]]; foo = [foo stringByReplacingOccurrencesOfString:@"’" withString:@""]; foo = [[foo componentsSeparatedByCharactersInSet:[[NSCharacterSet letterCharacterSet] invertedSet]] componentsJoinedByString:@" "]; foo = [foo stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; textView.text = [textView.text stringByAppendingString:[NSString stringWithFormat:@"%@ ", foo]]; } The code changes a NSString from a NSDictionary and adds it into a textView. Sometimes it first crashes in the second time using the for-loop. What did I wrong?

    Read the article

  • How does changing armv6/armv7 architecture to armv6 affect my iPad app? Will there be performance/st

    - by Flocked
    Hello, I need to change the the architectures of "Any iPhone OS Device" from "Optimized (armv6 armv7)" to "Standard (armv6)" for a library. I'm not exactly sure what effect will this have on the performance and stability of my iPad app. If I understand it right, the iPad has the armv7 architecture. I'm not so familiar with architectures, so I don't know what it means.

    Read the article

  • Can not read and save a number from/into an .plist

    - by Flocked
    Hello, I created a property list with the name propertys.plist. Then I wrote this: NSString *path = [[NSBundle mainBundle] bundlePath]; NSString *finalPath = [path stringByAppendingPathComponent:@"speicherung.plist"]; NSMutableArray *plistData = [[NSMutableArray arrayWithContentsOfFile:finalPath] retain]; int a = [plistData objectAtIndex:1]; NSLog(@"%i", a); // returns 41386032, but the right number is 0 a = a + 1; NSNumber *ff = [NSNumber numberWithInt:a]; [plistData insertObject:ff atIndex:1]; NSLog(@"%@", [plistData objectAtIndex:1]); // returns 41386033 [plistData writeToFile:finalPath atomically:YES]; My app always get the wrong number. Why?

    Read the article

  • How to change the font size gradually in a UILabel?

    - by Flocked
    Hello, is there a way to change the font size gradually in a UILabel? I tried it with: [UIView beginAnimations:@"foo" context:nil]; [UIView setAnimationDuration:0.8]; uiLabel.font = [UIFont boldSystemFontOfSize:144]; [UIView commitAnimations]; The problem is that the change of the font size happens instantly.

    Read the article

  • Why can I not add a animation to a UIImageView?

    - by Flocked
    Hello, Im trying to add a animation to a UIImageView, but it always fails. Why? Here is the code: //(…) UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); animationImage = [[UIImageView alloc]initWithImage:newImage]; [self.view addSubview:animationImage]; CATransition *animation = [CATransition animation]; [animation setDelegate:self]; [animation setDuration:0.35]; [animation setTimingFunction:UIViewAnimationCurveEaseInOut]; animation.type = @"pageCurl"; animation.fillMode = kCAFillModeForwards; animation.endProgress = 0.58; [animation setRemovedOnCompletion:NO]; [[animationImage layer] addAnimation:animation forKey:@"pageCurlAnimation"];

    Read the article

  • Can not add a animation to a UIImageView:

    - by Flocked
    Hello, Im trying to add a animation to a UIImageView, but it always fails. Why? Here is the code: UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); animationImage = [[UIImageView alloc]initWithImage:newImage]; [self.view addSubview:animationImage]; CATransition *animation = [CATransition animation]; [animation setDelegate:self]; [animation setDuration:0.35]; [animation setTimingFunction:UIViewAnimationCurveEaseInOut]; animation.type = @"pageCurl"; animation.fillMode = kCAFillModeForwards; animation.endProgress = 0.58; [animation setRemovedOnCompletion:NO]; [[animationImage layer] addAnimation:animation forKey:@"pageCurlAnimation"];

    Read the article

  • How to transform (rotate) a already exist CALayer/animation?

    - by Flocked
    Hello, I have added a CALayer to the UIView of my app: CATransition *animation = [CATransition animation]; [animation setDelegate:self]; [animation setDuration:0.35]; [animation setTimingFunction:UIViewAnimationCurveEaseInOut]; animation.type = @"pageCurl"; animation.fillMode = kCAFillModeForwards; animation.endProgress = 0.58; [animation setRemovedOnCompletion:NO]; [[self.view layer] addAnimation:animation forKey:@"pageCurlAnimation"]; Now when the user rotates the device, the layer always stays in the same position on the screen (in line to the homescreen button). Is it possible to rotate the animation/layer? I tried self.view.layer.transform = CGAffineTransformMakeRotation (angle); but this code just rotates the UIView and not the animation/layer I set.

    Read the article

  • Problems with creating and using of delegate-protocols

    - by Flocked
    Hello, I have the problem that I have created a delegate protocol, but the necessary methods are not executed, although I have implemented the protocol in my header file. Here are the detailed explanation: I created an instance of my ViewController (TimeLineViewController), which will be displayed. This ViewController contains a UITableView, which in turn receives the individual Cells / Rows from one instance of my TableViewCell. So the ViewController creates an instance of TableCellView. The TableViewCell contains a UITextView, which contains web links. Now I want, that not safari opens the links, but my own built-in browser. Unfortunately TableViewCell can not open a new ViewController with a WebView, so I decided to create a delegate protocol. The whole thing looks like this: WebViewTableCellDelegate.h: @protocol WebViewTableCellDelegate -(void)loadWeb; @end Then I created a instance WebViewDelegate in the TableViewCell: id <WebViewTableCellDelegate> _delegate; In the .m of the TableViewCell: @interface UITextView (Override) @end @class WebView, WebFrame; @protocol WebPolicyDecisionListener; @implementation UITextView (Override) - (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id < WebPolicyDecisionListener >)listener { NSLog(@"request: %@", request); [_delegate loadWeb]; } @end - (void)setDelegate:(id <WebViewTableCellDelegate>)delegate{ _delegate = delegate;} And in my TimeLineViewController I implemented the protocol with < and the loadWeb-metode: - (void)loadWeb{ WebViewController *web = [[WebViewController alloc] initWithNibName:nil bundle:nil]; web.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController: web animated:YES]; [web release]; } And when the instance of the TableViewCell will be created in the TimelineViewController: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *MyIdentifier = @"MyIdentifier"; MyIdentifier = @"tableCell"; TableViewCell *cell = (TableViewCell *)[tableView dequeueReusableCellWithIdentifier:MyIdentifier]; if(cell == nil) { [[NSBundle mainBundle] loadNibNamed:@"TableViewCell" owner:self options:nil]; cell = tableCell;} [cell setDelegate:self]; //… } It is the first time I created a own delegate-protocol, so maybe there are stupid mistakes. Also I´m learnung Objective-C and programming generally only for 4 weeks. Thanks for your help! EDIT: I think i found the problem, but I dont know how to resolve it. I try to use [_delegate loadWeb]; in the subclass of the UITextView (because that is the only way i can react on the weblinks) and the subclass can´t use [_delegate loadWeb];. I tried this in a other methode and it worked.

    Read the article

  • Search for a string between two known strings

    - by Flocked
    Hello, I have a String with this content: href="http://www.website.com/" /> [...] [...] I just want to get the central part of the string. How is it possible to get the part between @"href="" and @"" /" Note: Even if it looks like xml-code, it is inside of a NSString.

    Read the article

1