EvilZone

Programming and Scripting => C - C++ => Topic started by: AllusionOfIllusion on January 21, 2013, 02:25:32 AM

Title: [Objective-C] help - UIImageView
Post by: AllusionOfIllusion on January 21, 2013, 02:25:32 AM
Hey guys, so I wasn't too sure if this could be placed here (if it has to get moved/deleted, I'll do it) but on my way to learning programming better, I've been working on an iOS application (mobile app creation that I maybe could use later haha). Anyway, I've been having some trouble trying to get an UIImage to reveal itself (it's set to hidden (from the storyboard viewer) but after a certain event (an if statement) I would like for it to pop up and be viewable to the user.


Code:


Code: [Select]
if(isWordComplete) {         //this is where I believe code should call the image from a "hidden" state
        [myDisplay setHidden:YES];
        [myDisplay2 setHidden:YES];
        [myDisplay3 setHidden:YES];
        [myDisplay4 setHidden:YES];
        [myDisplay5 setHidden:YES];
        [myDisplay6 setHidden:YES];
        [myDisplay7 setHidden:YES];
        [self checkNumberofWordsUserCompleteInLevel:isWordComplete];
        [self moveToNextWord];
 
    }

I feel like I've tried everything with UIImageView but nothing seems to be working...maybe someone can point me in the right direction. Thanks in advance for any help!
Title: Re: [Objective-C] help - UIImageView
Post by: artymig on January 22, 2013, 04:15:55 AM
Maybe if you
Code: [Select]
[image setHidden:NO]... but I don't know.

Ask StackOverflow.
Maybe try coding in HTML (and use WebKit)?

iStuff??? Kill it!!!! Kill it with fire!!!
Title: Re: [Objective-C] help - UIImageView
Post by: AllusionOfIllusion on January 23, 2013, 12:46:34 AM
Thanks! I actually looked into it, and you were right. I was apparently having one of those days where you stare at it for hours, then realize you need 2 lines of code and it works haha
Title: Re: [Objective-C] help - UIImageView
Post by: bluechill on January 23, 2013, 12:52:00 AM
Ideally you'd use some of the core animation stuff to do this btw.  Your approach works but its rather unclean and could look better.  I suggest looking into core animation and quartz
Title: Re: [Objective-C] help - UIImageView
Post by: Satan911 on January 23, 2013, 06:25:33 AM
Ideally you'd use some of the core animation stuff to do this btw.  Your approach works but its rather unclean and could look better.  I suggest looking into core animation and quartz

+1

I usually use UIViewAnimationCurveEaseOut to a make view appear / disappear smoothly but you have other options.