Author Topic: [Objective-C] help - UIImageView  (Read 4970 times)

0 Members and 1 Guest are viewing this topic.

AllusionOfIllusion

  • Guest
[Objective-C] help - UIImageView
« 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!
« Last Edit: January 21, 2013, 02:26:40 am by AllusionOfIllusion »

artymig

  • Guest
Re: [Objective-C] help - UIImageView
« Reply #1 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!!!
« Last Edit: January 22, 2013, 04:16:28 am by artymig »

AllusionOfIllusion

  • Guest
Re: [Objective-C] help - UIImageView
« Reply #2 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

Offline bluechill

  • Cybermancer
  • Royal Highness
  • ****
  • Posts: 682
  • Cookies: 344
  • I am the existence in these walls
    • View Profile
Re: [Objective-C] help - UIImageView
« Reply #3 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
I have dreamed a dream, but now that dream has gone from me.  In its place now exists my own reality, a reality which I have created for myself by myself.

Offline Satan911

  • VIP
  • Knight
  • *
  • Posts: 289
  • Cookies: 25
  • Retired god/admin
    • View Profile
Re: [Objective-C] help - UIImageView
« Reply #4 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.
« Last Edit: January 23, 2013, 06:25:52 am by Satan911 »
Satan911
Evilzone Network Administrator