Go Back   iPhone Dev SDK Forum > Development Forums > iPhone SDK Development

Featured Member Applications

TanZen ($0.99)

Endless Walls ($0.99)

Air Hockey ($0.99)

SUPER STRIKE - Motion Bowl ($0.99)

BarSlot ($0.99)

MeterRead ($0.99)

Colorblind Helper ($4.99)

gContacts ($1.99)

ProgCalc ($1.99)

Forex On The Go Lite (FREE)

HUE knewit! ($0.99)

Want your application to be advertised here?

» Advertisements


Visit our friends over at The App Show! Steve and Dave produce a weekly show shining a light on the iPhone 2.0 software and the applications being developed by the amazing development community for the iPhone SDK!
» Online Users: 102
14 members and 88 guests
dtochetto, durthor, freshking, gwc05a, hkk, mwt, NewiPhoneDeveloper, nownot, nujohn, scotopia, snatch, solomon71, storm, tappedOut
Most users ever online was 207, 10-24-2008 at 09:29 AM.
» Stats
Members: 3,913
Threads: 5,612
Posts: 23,246
Top Poster: scottiphone (705)
Welcome to our newest member, dtochetto
Reply
 
LinkBack Thread Tools Display Modes
Old 10-07-2008, 11:46 PM   #1 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Sep 2008
Posts: 190
Default Does anyone know how to remove a subview?

Does anyone know how to remove a subview?
noobAppDeveloper is offline   Reply With Quote
Old 10-07-2008, 11:52 PM   #2 (permalink)
Senior Member
 
Join Date: Sep 2008
Posts: 682
Default

Just out of curiousity: what research did you do on this problem before asking this question? Search the header file? Search the documentation? Search the web?

The answer to your question is: YES.
PhoneyDeveloper is offline   Reply With Quote
Old 10-07-2008, 11:57 PM   #3 (permalink)
Senior Member
 
Join Date: Sep 2008
Posts: 210
Default

Quote:
Originally Posted by noobAppDeveloper View Post
Does anyone know how to remove a subview?
if you don't need it anymore...

[myView removeFromSuperview];

if you will need it again make sure you retain it first.

you could also just hide it.

myView.hidden = YES;
Kenrik is offline   Reply With Quote
Old 10-08-2008, 12:00 AM   #4 (permalink)
Senior Member
 
Join Date: Sep 2008
Posts: 210
Default

Quote:
Originally Posted by PhoneyDeveloper View Post
Just out of curiousity: what research did you do on this problem before asking this question? Search the header file? Search the documentation? Search the web?

The answer to your question is: YES.
hey now be kind to the n00bs...
I agree with you, I just think it's better to be helpful even if they don't deserve it.

We were all there at some point.
Kenrik is offline   Reply With Quote
Old 10-08-2008, 12:07 AM   #5 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Sep 2008
Posts: 190
Default

Haha, I apologize for the stupidity of the question. I always look around before asking my questions but I've been frustrated with this problem of mine for quite some time. I've dealt with ViewWillAppear, ViewDidDisappear, but for some reason, whenever I switch tabs, the view in my old tab never gets updated. Even though there has been new information that has been presented.

If any of you are interested in helping, here is my scenario.

I have a graphViewController which contains a UIScrollView and inside the UIScrollView a UIView. This UIView is populated from data contained within another tab. If I update the info in the other tab, and go back to the graphViewController, the UIView within it stays the same until I close/then reopen the app.

I've been trying to dealloc, etc... try a number of things within my graphViewController to no avail. Any hints? Sorry for being a noob, I guess I truly am.
noobAppDeveloper is offline   Reply With Quote
Old 10-08-2008, 12:33 AM   #6 (permalink)
Senior Member
 
Join Date: Sep 2008
Posts: 682
Default

OK Kenrik, you're on my list.

Also, I have to say you're wrong. Some people shouldn't post on this list. You have to have a certain level of ability to be able to understand the answers to your questions. It's like going to China and learning how to ask 'where's the bathroom' but not knowing enough Chinese to understand the answer. What's the point in asking?

I worked some years ago on a beta OS that was running on alpha hardware. The OS would only boot successfully one time in three tries. You can imagine how well it ran after it did boot. My job was to write some software that ran on that OS. Let's just say it took a while and debugging was difficult. How do you think Mr Noob Developer would have done on that project?

No offense meant to Mr Noob or anyone else but if you can't be bothered to search the header files or documentation for the answers to your questions then why should I answer those simple questions? Being able to learn new things and look things up is part of this business.

Being a noob is ok, yes we all were there at one time, although for me it was probably before you were born. But you have to have the basics. You have to be able to look things up. Google is your friend. I have always been amazed at how much iPhone code is available on the net, regardless of the NDA.

One of the problems with being a noob is that you don't know what questions to ask. You don't know what's important and what's likely affecting your problem. However, you should be able to ask a sensible question. Include what you've done to try to answer the question already. Include what you think the issues are. A one sentence simple question that everyone knows the answer to just indicates that you're not trying very hard and will not garner useful answers.
PhoneyDeveloper is offline   Reply With Quote
Old 10-08-2008, 01:13 AM   #7 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Sep 2008
Posts: 190
Default

I found the answer everyone. So apparently, the title for ViewWillAppear is

- (void)viewWillAppearBOOL)animated {}

NOT

- (void)viewWillAppear: {

}

and within it, I simply put [myView setNeedsDisplay]; and it all worked out marvelously. Thanks all. PHONEY DEVELOPER and KENRIK, I am now one step closer to noob-less.
noobAppDeveloper is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Powered by vBadvanced CMPS v3.0.1

All times are GMT -5. The time now is 03:10 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0