Subscribe ( )

iPhone Programming Tutorials


 

Forum

You must be logged in to post Login Register

Search 

How do you reference components from another view?

User Post

10:13 am
February 13, 2009


beowulf

Noob

posts 1

1

Does anyone know how to reference components from another view? or how do you access variables across source files? Here's what I am trying to do.  I created an app using the Tab Bar app template and added a UIWebView to my mainwindow.xib  Then I made a UITableView in my secondview.xib  What I want is to choose from a list on the tableview, then have the tableview update with a second level, then after selecting from the second level in the table view, have some html placed in the webview based on the selection.  Sounds simple, but in the ipone sdk it isn't.  First, I couldn't figure out anywhere I could put my IBOutlet for my uiwebview where IB could pick it up except for in my app delegate, so that's where I put it.  And I had to create a class for my UITAble View's functions (or whatever they're called) so I did.  I got my table to populate the first level, but when I click on something the selection function doesn't make the second level appear.  I think the reason is that my table's iboutlet is also in the app delegate and not in the class that serves as the uitable view delegate, so I can't call [tableview reloadData] from within my table view delegate because the variable tableview is in my app delegate!  Which means even if I could refresh my table, I couldn't have the selection method of the table set the html in the webview, because the iboutlet of webview is also in the app delegate!  How do you access variables across source files?

Search 

About the iCodeBlog forum

Most Users Ever Online:

44


Currently Online:

2 Guests

Forum Stats:

Groups: 2

Forums: 6

Topics: 419

Posts: 893

Membership:

There are 934 Members

There has been 1 Guest

There are 2 Admins

There is 1 Moderator

Top Posters:

bobcubsfan – 54

crazyiez – 30

Uhu – 17

AdeC – 17

Nick – 15

jitesh61 – 12

Administrators: Brandon (88 Posts), Collin (0 Posts)

Moderators: VertigoSol (26 Posts)



©   

  • Posted by on 6 Aug 2008 in Uncategorized
  •   |  
  •   |  
  •   |  
  • Comments Off

Comments are closed.