EvilZone

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

: [Objective-C] help - UIImageView
: AllusionOfIllusion 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:


:
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!
: Re: [Objective-C] help - UIImageView
: artymig January 22, 2013, 04:15:55 AM
Maybe if you
:
[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!!!
: Re: [Objective-C] help - UIImageView
: AllusionOfIllusion 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
: Re: [Objective-C] help - UIImageView
: bluechill 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
: Re: [Objective-C] help - UIImageView
: Satan911 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.