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 11-11-2010, 12:42 AM   #1 (permalink)
Registered Member
 
Join Date: Nov 2010
Posts: 2
zhimakaimen is on a distinguished road
Default Can xib(nib) used to a father class?

Hi,

I have 3 subclasses inheriting from a UIVewController, in which there is an imageview and a table view, currently I have 3 xibs for each of the subclass, and I want to replace the 3 xibs by 1, for example I create MyViewController class including an imageview and a table view, then create a xib for this class, and let the 3 subclass inherit from MyViewController, is it ok? Did anyone tried this?

myClass1 : myUIViewController
myClass2 : myUIViewController
myClass3 : myUIViewController


create myUIViewController.xib in interface builder.

When I create myClass1 or 2 or 3, will the UI interface of myUIViewController be shown?

Thanks

Zhimakaimen
zhimakaimen is offline   Reply With Quote
Old 11-11-2010, 02:58 AM   #2 (permalink)
Registered Member
 
Join Date: Mar 2010
Posts: 90
LittleX1 is on a distinguished road
Default

You can use a xib in as many view controllers as you like. A xib is nothing more than a resource file, like an image..
LittleX1 is offline   Reply With Quote
Old 11-11-2010, 01:30 PM   #3 (permalink)
Registered Member
 
Join Date: Nov 2010
Posts: 2
zhimakaimen is on a distinguished road
Default

Quote:
Originally Posted by LittleX1 View Post
You can use a xib in as many view controllers as you like. A xib is nothing more than a resource file, like an image..
Thanks. But when I create a subclass in the code, will the xib for the father class be showed?
zhimakaimen is offline   Reply With Quote
Reply

Bookmarks

Tags
father class, inherit, nib, xib

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: 345
10 members and 335 guests
7twenty7, chiataytuday, condor304, Creativ, Domele, dreamdash3, laureix68, LEARN2MAKE, mistergreen2011, tinamm64
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,661
Threads: 94,119
Posts: 402,896
Top Poster: BrianSlick (7,990)
Welcome to our newest member, tinamm64
Powered by vBadvanced CMPS v3.1.0

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