Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 6    Views: 74

Nelson
Aspiring developer
Profile
Posts: 57
Reg: Jun 06, 2013
Viseu
2,220
08/16/15 11:33 AM (8 years ago)

different blank scren's can have diferent .h, .m, and .xib files?

I built several "blank scren's" in the same BT app, and I need that each individual "blank scren's" has diferent .h, .m, and .xib files. how can I do this in in Xcode? Can you help me?
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
08/16/15 12:58 PM (8 years ago)
How can you do this in Xcode? Or in Buzztouch? I'm not sure why you would want several blank screens that all have different .h, .m and .xib files. The xib button menu plugin lets you have different xib files (but they would share the .h and .m files). You could always create a bunch of custom plugins in your control panel, one for each blank screen, and then just add the xib files to your plugin folders in Xcode. Does that help??
 
Nelson
Aspiring developer
Profile
Posts: 57
Reg: Jun 06, 2013
Viseu
2,220
like
08/16/15 03:08 PM (8 years ago)
Yes, it helped me a lot. Still I had not seen the xib button plugin menu. I will try it. When I create several blank scren's it only appears one "bt_screen_blank" folder. The xib folder must have the same name as bt_screen_blank.xib. I can only have one .xib for the various blank screens. It's possible to have diferent .xib files for each "blank scren plugin" that I create in BT?
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
08/16/15 03:37 PM (8 years ago)
If you use the xib button menu plugin then yes, you can create several different xib files within that one plugin, but they will all have the same .h and .m files.
 
Nelson
Aspiring developer
Profile
Posts: 57
Reg: Jun 06, 2013
Viseu
2,220
like
08/16/15 03:42 PM (8 years ago)
Ok,Thank you Mutzy that is good. I will try the plugin.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
08/17/15 01:54 AM (8 years ago)
I hope I don't confuse anyone... or myself for that matter, lol! There are 'filenames'. There are 'classes' and class names. 'Usually' the filename matches the class name (but does not have to). 'BT_screen_blank' is an example. If you look at the contents of the file, you will see "@interface BT_screen_blank..." in the header (.h) file and "implementation BT_screen_blank" in the implementation (.m) file. So the 'Class' is named 'BT_screen_blank'. But the 'filename' could be different, provided if your '#import' statement referred to the correct 'filename'. So you could have a class (SW_newClass) inside a filename called 'SW_nothingRelated.h/m' as long as you #import the correct filename for the correct class where needed. You can have as many classes as you want, as long as the names are different. You can have as many filenames as you want, as long as the filenames are also different. The filenames and the class names do not have to match, although it is easier to keep track of if you do. This is not a 'BT' thing, it's an iOS (or android, with modest changes in filenames) thing. Hope this helps. Cheers! -- Smug
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
08/17/15 12:54 PM (8 years ago)
And, just to further muddy the waters, an xib does not have to have the same name as the plugin. if it does, it loads automatically, but you can load an xib with a different name manually.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.