Search Results

Search found 530 results on 22 pages for 'uiimageview'.

Page 9/22 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Using UIImageViews for 'pages' in an iPhone/iPad storybook app?

    - by outtoplayinc
    I'm new to iPhone programming, and well, what seems obvious to me may seem silly to a seasoned coder. I did a few 'switching views' tutorials on Youtube, and basically, they seems to work nicely for adding pages to a storybook type app. You add a UIViewController and associated view for each page. My question is would this become insanely slow, or a memory hog if I continued this method for say....35+ pages? Each page would also have a sound file associated with it that would play narration when a page load and stops when we leave. Basically, think of a powerpoint type app, with sound, possibly animated image elements, next & back buttons. I'm probably thinking of this very simplistically, but that's where my experience is at for the moment. Any insight or tips as to better and or more efficient ways to proceed would be greatly appreciated.

    Read the article

  • Image Size for Animation!

    - by taimur-hamza
    Hi Everybody, I m new to iphone app development and i need some help. I have a list of 30 images that i have to animate and display with 0.1 second interval. I put all the images in an Array using this imageletter.animationImages = [NSArray arrayWithObjects:[UIImage imageNamed:@"1.png"], ...... ,nil] And then animate it using these statements, [imageletter setAnimationDuration:16]; [imageletter startAnimating]; [NSTimer scheduledTimerWithTimeInterval:mytime target:self selector:@selector(StopAfterCertainTime) userInfo:nil repeats:NO]; Now the problem is that the size of each image is 8kb , it runs fine on iphone simulator but crashes on device. When i used 30 other images of 4kb each it runs fine both on simulator and device. Can anybody tell me what is the ideal size for such kind of task. Thanks

    Read the article

  • Show and Fade UIImageView after 2 Seconds

    - by user1536432
    I am working on a notification system in my iPhone game and want an image to pop up on the screen and automatically fade after 2 seconds. User clicks a button that calls the method "popupImage" An image appears on the screen in a designated spot, it doesn't need to fade in The image fades out by itself after being on the screen for 2 seconds. Is there any way of doing this? Thanks ahead of time.

    Read the article

  • UIView animations on a path not linear

    - by chis54
    I have an iOS application that I want to animate a falling leaf (or several). I have my leaf image in an ImageView and I've figured out a simple animation from the documentation: [UIView animateWithDuration:4.0f delay:0 options:UIViewAnimationTransitionFlipFromLeft animations:^(void) { leaf1ImageView.frame = CGRectMake(320, 480, leaf1ImageView.frame.size.width,leaf1ImageView.frame.size.height); } completion:NULL]; This will make the leaf go from its starting position to the bottom right corner in a straight line. How would I animate this to follow a path or curve like a parabola or sinusoid and maybe even rotate the image or view? Would this be done in the animations block? Thanks in advance!

    Read the article

  • iOS UITableViewCell UIImageView setting on different conditions

    - by chis54
    I have an app that has a UITableView and in my Cells I have UIImageViews and UILabels that change images/textColors for a day theme and a night theme (trying to be automatically set). My issue is that I set the images and colors when the table is populated with cellForRowAtIndexPath and its during the day "theme", then if I reopen the app hours later in the night "theme" and the app is still in the "background" and not needing to be reloaded (ie viewDidLoad doesn't fire), the day "theme" shows until I scroll the UITableView and then the night "theme" shows when new cells are brought into view by scrolling. How should I set the objects in my cells when changing around time of the day? I was thinking to use an NSTimer, but I'm not sure how to update the objects in my cells. I was also thinking about using the appropriate methods in the AppDelagate to set things in motion, but is there a way to force reloading the TableView? Any suggestions?

    Read the article

  • How to show/hide UIImageView when I want.

    - by Madness64
    I'm having a little problem with an iPhone app I'm currently developing. When the user touch a button, it calls an IBAction named refreshQuestion, which is supposed to show an image hover the screen to ask the user to wait a moment, then it has to call another function, and finally it has to hide the image. The problem is that the image won't appear. As well as the network activity indicator. Any help? Here is the code : - (IBAction)refreshQuestion:(id)sender{ pleaseWait.hidden = NO; [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; [self loadData]; pleaseWait.hidden = YES; [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; }

    Read the article

  • Resizing the imageView in a UITableView

    - by Luca
    Hi! I Created a grouped table view, and I noticed that placing an image in the imageView results in an image that is too large. It overlaps the rounded borders of the cell, which is horrible. I tried looking for a way to resize it, but I found many answers that didn't quite satisfy me. How would you do this? Which is the simplest way to go? The solutions I found where strangely complicated. Thanks!

    Read the article

  • what is the required code method of making a sticker app?

    - by zeropt7
    I am new to photo apps, recently I am interested in making a sticker app like those can be seen in the appstore, I know I would need to use uiimagepickercontroller, uiscrollview and uigesturerecognizer. However I wonder which code method should I use for the app to load multiple stickers? Should it be called programmatically? Is that I would need to use the if-statement, say if one sticker is loaded, the app will auto generate a new sticker on top of it?

    Read the article

  • UITableView not showing background image.

    - by K.Honda
    I have a uitableview with 2 cells (custom tableviewcells) and a button for login. I made them programmatically. Now I want to put a background image behind the 2 custom cells and the button. I went into IB and put the image view on top of the tableview and then put a picture on it which I want as the background. Then I went into viewDidLoad and put this bit of code tblSimpleTable.backgroundColor = [UIColor clearColor]; to clear the tableviews background colour. It now looks like this: But the background does not appear. Does anyone know how to fix this? Thanks.

    Read the article

  • iPhone UIButton addTarget:action:forControlEvents: not working

    - by Aaron Vegh
    I see there are similar problems posted here, but none of the solutions work for me. Here goes: I have a UIButton instance inside a UIView frame, which is positioned within another UIView frame, which is positioned in the main window UIView. To wit: UIWindow --> UIView (searchView) --> UISearchBar (findField) --> UIView (prevButtonView) --> UIButton (prevButton) --> UIView (nextButtonView) --> UIButton (nextButton) So far, so good: everything is laid out as I want it. However, the buttons aren't accepting user input of any kind. I am using the UIButton method addTarget:action:forControlEvents: and to give you an idea of what I'm doing, here's my code for nextButton: nextButton = [UIButton buttonWithType:UIButtonTypeCustom]; [nextButton setImage:[UIImage imageNamed:@"find_next_on.png"] forState:UIControlStateNormal]; [nextButton setImage:[UIImage imageNamed:@"find_next_off.png"] forState:UIControlStateDisabled]; [nextButton setImage:[UIImage imageNamed:@"find_next_off.png"] forState:UIControlStateHighlighted]; [nextButton addTarget:self action:@selector(nextResult:) forControlEvents:UIControlEventTouchUpInside]; The method nextResult: never gets called, the state of the button doesn't change on touching, and there's not a damned thing I've been able to do to get it working. I assume that there's an issue with all these layers of views: maybe something is sitting on top of my button, but I'm not sure what it could be. In the interest of information overload, I found a bit of code that would print out all my view info. This is what I get for my entire view hierarchy: UIWindow {{0, 0}, {320, 480}} UILayoutContainerView {{0, 0}, {320, 480}} UINavigationTransitionView {{0, 0}, {320, 480}} UIViewControllerWrapperView {{0, 64}, {320, 416}} UIView {{0, 0}, {320, 416}} UIWebView {{0, 44}, {320, 416}} UIScroller {{0, 0}, {320, 416}} UIImageView {{0, 0}, {54, 54}} UIImageView {{0, 0}, {54, 54}} UIImageView {{0, 0}, {54, 54}} UIImageView {{0, 0}, {54, 54}} UIImageView {{-14.5, 14.5}, {30, 1}} UIImageView {{-14.5, 14.5}, {30, 1}} UIImageView {{0, 0}, {1, 30}} UIImageView {{0, 0}, {1, 30}} UIImageView {{0, 430}, {320, 30}} UIImageView {{0, 0}, {320, 30}} UIWebDocumentView {{0, 0}, {320, 21291}} UIView {{0, 0}, {320, 44}} UISearchBar {{10, 8}, {240, 30}} UISearchBarBackground {{0, 0}, {240, 30}} UISearchBarTextField {{5, -2}, {230, 31}} UITextFieldBorderView {{0, 0}, {230, 31}} UIPushButton {{205, 6}, {19, 19}} UIImageView {{10, 8}, {15, 15}} UILabel {{30, 7}, {163, 18}} UIView {{290, 15}, {23, 23}} UIButton {{0, 0}, {0, 0}} UIImageView {{-12, -12}, {23, 23}} UIView {{260, 15}, {23, 23}} UIButton {{0, 0}, {0, 0}} UIImageView {{-12, -12}, {23, 23}} UINavigationBar {{0, 20}, {320, 44}} UINavigationButton {{267, 7}, {48, 30}} UIImageView {{0, 0}, {48, 30}} UIButtonLabel {{11, 7}, {26, 15}} UINavigationItemView {{79, 8}, {180, 27}} UINavigationItemButtonView {{5, 7}, {66, 30}} MBProgressHUD {{0, 0}, {320, 480}} UIActivityIndicatorView {{141, 206}, {37, 37}} UILabel {{117, 247}, {86, 27}} The relevant part is noted above the UINavigationBar section. Anyone have any suggestions? I'm all out. Thanks for reading. Aaron.

    Read the article

  • How to animate the change of image in an UIImageView?

    - by mystify
    I have an UIImageView with an image. Now I have a completely new image (graphic file), and want to display that in this UIImageView. If I just set myImageView.image = newImage; the new image is visible immediately. Not animatable. I want it to nicely fade into the new image. I thought maybe there's a better solution than just creating a new UIImageView on top of that and blending with animation?

    Read the article

  • iOS sdk question: how do I cast a UIView to a UIImage View (alternativly how do I get a UIImageView from a GestureRecognzer?)

    - by user439299
    Desired end result: user taps a UIImageView and the image changes to another image (a subsequent tap returns the image to the original state) Problem: I add a (unique) selector to a bunch of UIImageViews (in an array) and point the action at the same function - let's call this function imageTapped: for now. Here is my code so far: -(void)imageTapped:(UITapGestureRecognizer *)tapGesture { UIImageView *view = tapGesture.view; // rest of code... } This code actually works fine but gets a warning when I run it: "Incompatible objective c types initilizing 'struct UIView *', expected 'struct UIImageView *' Any way to get rid of this? Not sure how casting works in objective c... primitive types seem to work fine such as (int)someFloat works fine but (UIImageView)someUiView doesn't work. Like I said, code works alright when I run it but would like to get ride of the compiler warning. Any help would be awesome.... I am very new to objective c (or any non java language for that matter) so be gentle. Thanks in advance.

    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

  • IPhone sdk, more accurate collision detection and set the frame/bounds of UIImageView...

    - by Harry
    Hey, Im having a big problem with my app at the moment, its all too inaccurate. I have a image of a ballooon, https://dl.dropbox.com/u/2578642/Balloonedit.png And i have a dart which if it collides into the balloon the game ends. At the moment i am populating the image of the balloon with 8 UIImageViews. and i am detecting if the dart hits them, this was suppose to make it really accurate but its not, the dart pretty much passes through the balloon when its meant to collide, so i have a plan, is there any way to detect when the dart hits the actual image of the balloon not the UIImageView, or is there any way to draw a border around the balloon and detect if it hits that? currently i am using this code to detect the collision: if (CGRectIntersectsRect(pinend.frame, balloonbit1.frame)){ [maintimer invalidate]; accelManeger.delegate = nil; [ball setImage:img]; [UIImageView beginAnimations:nil context:NULL]; [UIImageView setAnimationDuration:0.3]; ball.transform = CGAffineTransformMakeScale(2, 2); [UIImageView commitAnimations]; } So in one method there are 40 of these bits of code and as you can imagine it is not very accurate/fast to respond. So like i said is there a way to draw a border or something around the balloon and detect the collision between the border and dart? Because then i would imagine it would run a lot smother because it would only have to process 5 bits of code. Thanks for any help. This is a big Question so if you can answer it i will buy your app :) Cheers, Harry :/

    Read the article

  • Very very weird problem with UIImageView property - I can access it then I can't, and it's not nil.

    - by just_another_coder
    Very very weird problem with UIImageView property on iPad application @interface MyViewController : UIViewController { IBOutlet UIImageView* coverImage; } @property(nonatomic, retain) IBOutlet UIImageView* coverImage; … more code @implementation MyViewController @synthesize coverImage; … more code - (void)viewDidLoad { [super viewDidLoad]; NSString* imageName = @"my_image.png"; UIImage* tempImage = [UIImage imageNamed:imageName]; [self.coverImage setImage:tempImage]; } The above code WILL display the image. In another part of code: -(IBAction) stopButtonPressed:(id)sender { [self.coverImage setHidden:YES]; NSLog(@"coverImage desc: %@", [coverImage description]); } The image will NOT disappear. I know the reference to the image isn't nil, because it gives me this output: 2010-05-29 17:37:40.706 MyApp[95360:207] coverImage desc: UIImageView: 0x5128420; frame = (0 0; 1024 768); autoresize = RM+BM; userInteractionEnabled = NO; layer = CALayer: 0x512bed0 In addition, if I move the code in viewDidLoad to another part of the class, and try to execute it from there, it fails to show the image at all.

    Read the article

  • Pass Variables In Inheritance (Obj - C)

    - by Marmik Shah
    I working on a project in Obj-C where i have a base class (ViewController) and a Derived Class (MultiPlayer). Now i have declared certain variables and properties in the base class. My properties are getting accessed from the derived class but im not able to access the variables (int,char and bool type). I'm completely new to Obj-C so i have no clue whats wrong. I have used the data types which are used in C and C++. Is there some specific way to declare variables in Obj-C?? If so, How? Here are my files ViewController.h #import <UIKit/UIKit.h> @interface ViewController : UIViewController @property (weak,nonatomic) IBOutlet UIImageView* backGroungImage; @property (strong,nonatomic) IBOutlet UIImageView *blockView1; @property (strong,nonatomic) IBOutlet UIImageView *blockView2; @property (strong,nonatomic) IBOutlet UIImageView *blockView3; @property (strong,nonatomic) IBOutlet UIImageView *blockView4; @property (strong,nonatomic) IBOutlet UIImageView *blockView5; @property (strong,nonatomic) IBOutlet UIImageView *blockView6; @property (strong,nonatomic) IBOutlet UIImageView *blockView7; @property (strong,nonatomic) IBOutlet UIImageView *blockView8; @property (strong,nonatomic) IBOutlet UIImageView *blockView9; @property (strong,nonatomic) UIImage *x; @property (strong,nonatomic) UIImage *O; @property (strong,nonatomic) IBOutlet UIImageView* back1; @property (strong,nonatomic) IBOutlet UIImageView* back2; @end ViewController.m #import "ViewController.h" @interface ViewController () @end @implementation ViewController int chooseTheBackground = 0; int movesToDecideXorO = 0; int winningArrayX[3]; int winningArrayO[3]; int blocksTotal[9] = {8,3,4,1,5,9,6,7,2}; int checkIfContentInBlocks[9] = {0,0,0,0,0,0,0,0,0}; char determineContentInBlocks[9] = {' ',' ',' ',' ',' ',' ',' ',' ',' '}; bool player1Win = false; bool player2Win = false; bool playerWin = false; bool computerWin = false; - (void)viewDidLoad { [super viewDidLoad]; if(chooseTheBackground==0) { UIImage* backImage = [UIImage imageNamed:@"MainBack1.png"]; _backGroungImage.image=backImage; } if(chooseTheBackground==1) { UIImage* backImage = [UIImage imageNamed:@"MainBack2.png"]; _backGroungImage.image=backImage; } } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } @end I am not able to use the above declared variables in my derived classes!

    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

  • How to check whether a CGPoint is inside a UIImageView?

    - by Horace Ho
    In touchesBegan: CGPoint touch_point = [[touches anyObject] locationInView:self.view]; There are tens of UIImageView around, stored in a NSMutableArray images. I'd like to know is there a built-in function to check if a CGPoint (touch_point) is inside one of the images, e.g.: for (UIImageView *image in images) { // how to test if touch_point is tapped on a image? } Thanks Follow up: For unknown reason, pointInside never returns true. Here is the full code. - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; touch_point = [touch locationInView:self.view]; for (UIImageView *image in piece_images) { if ([image pointInside:touch_point withEvent:event]) { image.hidden = YES; } else { image.hidden = NO; } NSLog(@"image %.0f %.0f touch %.0f %.0f", image.center.x, image.center.y, touch_point.x, touch_point.y); } } although I can the two points are sometimes identical in the NSLog output ... I also tried: if ([image pointInside:touch_point withEvent:nil]) the result is the same. never returns a true. To eliminate the chance of anything goes with with the images. I tried the following: if (YES or [image pointInside:touch_point withEvent:event]) all images are hidden ater the first click on screen.

    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

  • plus minus table View cell

    - by user1748387
    I have the following code - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; UIImage * i1 = [UIImage imageNamed: @"inc_01.png"]; UIImage * i2 = [UIImage imageNamed: @"inc_02.png"]; UIImage * i3 = [UIImage imageNamed: @"inc_04.png"]; UIImage * i5 = [UIImage imageNamed: @"inc_05.png"]; UIImage * i6 = [UIImage imageNamed: @"inc_06.png"]; UIImage * i7 = [UIImage imageNamed: @"inchd.png"]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } if(indexPath.row == 0) { UIImageView * header= [[UIImageView alloc] initWithImage: i1]; cell.backgroundView = header; // Configure the cell… } else if (indexPath.row == 2) { UIImageView *backgroundCellImage=[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 280, 11)]; backgroundCellImage.image=[UIImage imageNamed:@"inc_06.png"]; [cell.contentView addSubview:backgroundCellImage]; } else { // Configure the cell… UIImageView *imageView = [[UIImageView alloc] initWithImage: i3]; cell.textLabel.text = @"text"; UIImageView *backgroundCellImage=[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 57, 46)]; backgroundCellImage.image=[UIImage imageNamed:@"inc_02.png"]; UIImageView *backgroundCellImage2=[[UIImageView alloc] initWithFrame:CGRectMake(223, 0, 57, 46)]; backgroundCellImage2.image=[UIImage imageNamed:@"inc_04.png"]; UILabel * label = [[UILabel alloc] initWithFrame:CGRectMake(57, 0, 166, 46)]; label.text = @"wow"; [cell.contentView addSubview:backgroundCellImage]; [cell.contentView addSubview:backgroundCellImage2]; [cell.contentView addSubview:label]; } return cell; } that basically creates a table view and puts an image to the left and right of each cell. I want it so that people can click on the left or right image in each cell, and something different happens based on the cell number. So if they click on the left image for cell in row 1, a function gets call with the row number they clicked on, and an indicator telling me they clicked on the left image and not the right image. How can I do that using objective-c?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >