Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

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

Reply
 
LinkBack Thread Tools Display Modes
Old 07-24-2011, 11:49 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 50
Maxner is on a distinguished road
Default Right way to set up UITableView inside a UIView

This is just to make sure that I did it right. So i have the UIView which is the view of Files Owner, and inside the UIView i have a small UITableView. Since Files owner is a subclass of UIViewController i cant use File Owner as data source (the app will crash). So what i do is add a UITableViewController to the .xib and set the class to the UITableView Subclass class file. Then i connect data source with the TableViewController and delegate with files owner, then everything works, but is it the right way to do it?
Maxner is offline   Reply With Quote
Old 07-24-2011, 01:56 PM   #2 (permalink)
Registered Member
 
Join Date: Jul 2011
Location: Bilbao, Spain
Posts: 8
shadowfax is on a distinguished road
Default

I'm a bit uncertain of what you're trying to do, or the steps you describe (A screenshot would be useful)... or maybe it's because I'm still a newbie to X-Code.

However, why would the app crash? If you implement the protocols and the delegate correctly there should be no problem. I've got a UIView subclass (Not even UIViewController) handling a UIPickerView and a UIToolbar inside it (All in one class).

However, why don't you use a UITableViewController?

Usually a UITableView that doesn't reach the edges of the screen doesn't show up nicelly. Usually when someone ask for this kind of layout it is because there is something at the top or at the bottom of the list. If that is the case, I guess it would be best to use the tableHeaderView or tableHeaderView.

Best regards
shadowfax is offline   Reply With Quote
Old 07-24-2011, 02:56 PM   #3 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 50
Maxner is on a distinguished road
Default

Quote:
Originally Posted by shadowfax View Post
I'm a bit uncertain of what you're trying to do, or the steps you describe (A screenshot would be useful)... or maybe it's because I'm still a newbie to X-Code.

However, why would the app crash? If you implement the protocols and the delegate correctly there should be no problem. I've got a UIView subclass (Not even UIViewController) handling a UIPickerView and a UIToolbar inside it (All in one class).

However, why don't you use a UITableViewController?

Usually a UITableView that doesn't reach the edges of the screen doesn't show up nicelly. Usually when someone ask for this kind of layout it is because there is something at the top or at the bottom of the list. If that is the case, I guess it would be best to use the tableHeaderView or tableHeaderView.

Best regards
I can't use a TabelViewController as said before, but the table goes till the edges apart from the bottom, where i have other stuff, the app isn't crashing, i just wanted to clarify things and know if im doing it right.
__________________
Check out my first App: Canada Taxes & Tip Calculator
Maxner is offline   Reply With Quote
Old 07-24-2011, 04:46 PM   #4 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

See the table view link in my signature for guidance.
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Reply

Bookmarks

Tags
data source, delegate, uitableview

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



» Advertisements
» Online Users: 406
17 members and 389 guests
7twenty7, blasterbr, buggen, chiataytuday, Clouds, dre, fiftysixty, HemiMG, jeroenkeij, jimmyon122, jonathandeknudt, LEARN2MAKE, n00b, nyoe, pungs, tymex, UMAD
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,668
Threads: 94,121
Posts: 402,902
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jonathandeknudt
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:58 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0