Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 25    Views: 108

OrchardApps
Code is Art
Profile
Posts: 115
Reg: Jan 11, 2012
Brisbane austra...
5,850
09/02/12 03:59 PM (13 years ago)

Hide nav bar in custom html doc plugin screen

Hi everyone, As the title suggests I have created a screen using the BT_plugin that is a html doc screen. It all works great,except I am having trouble hiding the nav bar. I am using a finger swipe gesture to return to the previous screen so want to remove all the top bits. Any help would be appreciated. Christine
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
09/02/12 04:08 PM (13 years ago)
Buzztouch version ?
 
OrchardApps
Code is Art
Profile
Posts: 115
Reg: Jan 11, 2012
Brisbane austra...
5,850
like
09/02/12 04:10 PM (13 years ago)
Ahhh - I always do that sorry. ios - bt 1.5
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
09/02/12 04:24 PM (13 years ago)
Just tried it in BTv1.5 (Android) I r worked no problem. Go to Advance Properties NAV BAR Nav Bar Style Choose "hide Nav Bar" Fred
 
OrchardApps
Code is Art
Profile
Posts: 115
Reg: Jan 11, 2012
Brisbane austra...
5,850
like
09/02/12 04:30 PM (13 years ago)
Hi Fred, Thanks for that, but because I have created the html doc via a custom plugin there are no advanced properties. So unless I am really missing something and have set up my plugin incorrectly I have to do it somewhere in the code. Thanks. Christine
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
09/02/12 05:02 PM (13 years ago)
Thought you had just mangled the BTv1.5 Custom HTML, Text screen name. But congrats on creating a custom screen. Did you use the BTv1.5 Cordon Plug-in screen? Fred
 
OrchardApps
Code is Art
Profile
Posts: 115
Reg: Jan 11, 2012
Brisbane austra...
5,850
like
09/02/12 05:05 PM (13 years ago)
Hi Fred, I'm not quite that clever. I added a screen using the Add Custom plugin. Then in the JSON I changed it to include my own .h and .m files that I copied straight from the buzztouch html doc .h and .m files. Works great, but I can't get rid of the top parts. Does that make sense? Cheers
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
09/02/12 06:23 PM (13 years ago)
Yes, and I took a look at the screen. Open up the files and search for the text that's displayed and comment out the code you see. If it was Android I would say it's in the .xml file, but I'm not sure how it works in ios. Fred
 
OrchardApps
Code is Art
Profile
Posts: 115
Reg: Jan 11, 2012
Brisbane austra...
5,850
like
09/02/12 07:08 PM (13 years ago)
Argh. I was making it too hard for myself. Change line of code : //hide nav bar [self.navigationController setNavigationBarHidden:FALSE animated:TRUE]; to //hide nav bar [self.navigationController setNavigationBarHidden:TRUE animated:TRUE]; in the my custom .h file.
 
Cyrus_8888
I hate code!
Profile
Posts: 151
Reg: Dec 24, 2011
Sydney
1,610
like
09/03/12 08:40 PM (13 years ago)
Hi Wrigglepot Thanks for sharing, but I'm having some difficulty to implement your custom plugin into my project. I wanna to create a double tap gesture recognizer from a html document to link with my other xcode BT screens. Somehow xcode just can't recognise UITapGestureRecognizer in both .h and .m file, I tried to change the itemType, itemNickname, and classFileName in JSON, but the display I got is "screen not found?" Obviously something is not link up. After I download the new custom plugin from BT, besides ViewController.m & ViewController.h, is there any other files I need to drag to xcode? Thanks in advance!!!
 
Cyrus_8888
I hate code!
Profile
Posts: 151
Reg: Dec 24, 2011
Sydney
1,610
like
09/04/12 03:35 AM (13 years ago)
Hi Wrigglepot Thanks for sharing, but I'm having some difficulty to implement your custom plugin into my project. I wanna to create a double tap gesture recognizer from a html document to link with my other xcode BT screens. Somehow xcode just can't recognise UITapGestureRecognizer in both .h and .m file, I tried to change the itemType, itemNickname, and classFileName in JSON, but the display I got is "screen not found?" Obviously something is not link up. After I download the new custom plugin from BT, besides ViewController.m & ViewController.h, is there any other files I need to drag to xcode? Thanks in advance!!!
 
OrchardApps
Code is Art
Profile
Posts: 115
Reg: Jan 11, 2012
Brisbane austra...
5,850
like
09/05/12 03:52 AM (13 years ago)
Hi, It sounds like it's not finding your html doc. Have you copied it into the documents folder in xcode? Can you copy your json file text here? I would also just do what I've done with the swipe gesture first. Get that working and then change to the double tap. Cheers Chris
 
Cyrus_8888
I hate code!
Profile
Posts: 151
Reg: Dec 24, 2011
Sydney
1,610
like
09/05/12 04:59 AM (13 years ago)
Hi Christine, Thanks for the warm reply. Actually my intension is to incorporate jQuery in my project. Having set them as my home page. Double tap gesture recognizer can leads them to my other xcode screens. So YES, I added all of them (XXX.html, XXX.js, XXX.css) in BT_Docs. But still comes out with a disappointed result. My JSON file look something like {"itemId":"A67DA74C6F375BB7E0845A8", "itemType":"Tap_gesture", "itemNickname":"Tap plugin", "classFileName":"Tap_gesture"} Cheers! Cyrus
 
OrchardApps
Code is Art
Profile
Posts: 115
Reg: Jan 11, 2012
Brisbane austra...
5,850
like
09/05/12 05:11 AM (13 years ago)
Hi Cyrus, No problem - here to help. You should leave "itemType" as "BT_screen_plugIn" itemNickname doesn't look right. That should be the nick name of your plugin name, but I'm surprised that it has spaces. I'm guessing though - change the item type first and see how you go. Cheers Christine
 
Cyrus_8888
I hate code!
Profile
Posts: 151
Reg: Dec 24, 2011
Sydney
1,610
like
09/05/12 06:45 AM (13 years ago)
HI Christine, Still no luck. I re-created the plugin name: Swipegesture to run a test base on your previous post. Guess what? ....."screen not found"... Gosh what a headache. http://dl.dropbox.com/u/20163884/gestureview.jpg
 
Cyrus_8888
I hate code!
Profile
Posts: 151
Reg: Dec 24, 2011
Sydney
1,610
like
09/06/12 10:05 PM (13 years ago)
Hi Christine, Any thought? Cheers Cyrus
 
OrchardApps
Code is Art
Profile
Posts: 115
Reg: Jan 11, 2012
Brisbane austra...
5,850
like
09/07/12 04:41 AM (13 years ago)
Hi Cyrus, Sorry for the delay. I haven't been able to work on this - catching up on sleep and sick kids. in your m file it should say @implementation Swipegesture.h I can see that you are trying to reference jquery stuff, which I know nothing about. I would start at the most basic level first to get it working and then expand. That seems the most obvious place to start to me - change the @implementation. What version are you using? Your .h file looks very different to mine : #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #import "BT_viewController.h" #import "BT_downloader.h" #import "BT_item.h" @interface CF_screen_101 : BT_viewController <BT_downloadFileDelegate, UIWebViewDelegate, UIGestureRecognizerDelegate, UIActionSheetDelegate>{ UIWebView *webView; UIToolbar *browserToolBar; NSString *externalURL; NSString *localFileName; NSString *dataURL; BT_downloader *downloader; int didInit; int downloadInProgress; } @property (nonatomic, retain) UIWebView *webView; @property (nonatomic, retain) UIToolbar *browserToolBar; @property (nonatomic, retain) NSString *externalURL; @property (nonatomic, retain) NSString *localFileName; @property (nonatomic, retain) NSString *dataURL; @property (nonatomic, retain) BT_downloader *downloader; @property (nonatomic) int didInit; @property (nonatomic) int downloadInProgress; -(void)layoutScreen; -(void)initLoad; -(void)loadBundleData; -(void)loadCachedData; -(void)stopLoading; -(void)goForward; -(void)goBack; -(void)launchInNativeApp; -(BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType; -(void)confirmLink:(NSString *)theMessage; @end Hope that helps. Christine
 
Cyrus_8888
I hate code!
Profile
Posts: 151
Reg: Dec 24, 2011
Sydney
1,610
like
09/07/12 05:27 AM (13 years ago)
Hi Christine, No problem. Thanks for your warm reply. Didn't noticed that I have bunch of codes missing in the .h file. Thanks for that. After I tried to add it the missing codes. Sadly, result still unresolve. I'm not quite sure what version of plugin it is. I'm using buzztouch v1.5 to develop the app not the self host. The plugin is from BT website where you can "create custom plugin". Weird... Do you think the plugin may have a different version? Few questions 1.The plugin contains few files like config.txt, icon.png, index.php, readme.txt, save_JSON.php, screenshots folder, source-android folder, source-ios folder and update.txt, right? Do we need to drag to whole folder into xcode or just .m and .h from the source - ios folder? 2. In the custom plugin property JSON data, itemid- default value itemType- BT_screen_plugin itemNickname- as my plugin name: Swipegesture classFileName: Swipegesture - Not sure about this one LocalFileName: sample.html- I use BT sample to test it Here is some log I found in xcode debug mode. 2012-09-07 21:57:09.032 jquery[9114:707] BT_screen_menuList: didSelectRowAtIndexPath: Selected Row: 3 2012-09-07 21:57:09.034 jquery[9114:707] BT_application: getScreenDataByItemId A6AF23411DEB44DEE8DF00F 2012-09-07 21:57:09.040 jquery[9114:707] BT_application: screenType is BT_screen_plugIn for screen with nickname: "Swipegesture" and itemId: A6AF23411DEB44DEE8DF00F 2012-09-07 21:57:09.045 jquery[9114:707] BT_viewControllerManager: handleTapToLoadScreen 2012-09-07 21:57:09.049 jquery[9114:707] BT_viewControllerManager: the parent screen nickname: "Home" itemId: D5AE09A9A641F6FEE36C36A itemType: BT_screen_menuList 2012-09-07 21:57:09.054 jquery[9114:707] BT_viewControllerManager: the menu/button tapped is itemId: 668E92B930DAE4C13502831 2012-09-07 21:57:09.059 jquery[9114:707] BT_viewControllerManager: the screen to load is nickname: "Swipegesture" itemId: A6AF23411DEB44DEE8DF00F itemType: BT_screen_plugIn 2012-09-07 21:57:09.063 jquery[9114:707] BT_viewControllerManager: initViewControllerForScreen nickname: "Swipegesture" itemId: A6AF23411DEB44DEE8DF00F type: BT_screen_plugIn 2012-09-07 21:57:09.068 jquery[9114:707] BT_viewControllerManager: initViewControllerForScreen: ERROR, could not initialize view controller for screen with itemId: A6AF23411DEB44DEE8DF00F 2012-09-07 21:57:09.072 jquery[9114:707] BT_viewControllerManager: getErrorViewController 2012-09-07 21:57:09.077 jquery[9114:707] BT_screen_menuList: INIT 2012-09-07 21:57:09.081 jquery[9114:707] BT_rotatingNavController: pushViewController for screen: A6AF23411DEB44DEE8DF00F 2012-09-07 21:57:09.086 jquery[9114:707] BT_screen_menuList: viewDidLoad 2012-09-07 21:57:09.091 jquery[9114:707] BT_viewUtilities: getTableViewForScreen with nickname: "no nickname?" and itemId: error view controller has no itemId and type: BT_screen_menuList 2012-09-07 21:57:09.097 jquery[9114:707] BT_screen_menuList: viewWillAppear 2012-09-07 21:57:09.101 jquery[9114:707] BT_viewUtilities: configureBackgroundAndNavBar for screen with nickname: "no nickname?" and itemId: error view controller has no itemId and type: BT_screen_menuList 2012-09-07 21:57:09.108 jquery[9114:707] BT_fileManager: File does exist in Xcode bundle: blank.png 2012-09-07 21:57:09.113 jquery[9114:707] BT_background_view: Image for background view exists in Xcode bundle - not downloading. 2012-09-07 21:57:09.117 jquery[9114:707] BT_background_view: setImage 2012-09-07 21:57:09.227 jquery[9114:707] BT_screen_menuList: loadData 2012-09-07 21:57:09.229 jquery[9114:707] BT_screen_menuList: using menu items from the screens configuration data. 2012-09-07 21:57:09.235 jquery[9114:707] BT_screen_menuList: layoutScreen 2012-09-07 21:57:09.244 jquery[9114:707] BT_screen_menuList: This menu has no list items? Cheers Cyrus
 
OrchardApps
Code is Art
Profile
Posts: 115
Reg: Jan 11, 2012
Brisbane austra...
5,850
like
09/07/12 05:38 AM (13 years ago)
Hi Cyrus, I think we're making it harder than it is. I am using 1.5 also. It isn't a new pluging, but a standard BT screen. So for example : Create and select the type as "Load Custom Plugin". You won't have to drag anything into xcode. I would start from scratch creating a test screen in your project. Don't put it as a home page. Then change your json to have itemid- default value itemType- BT_screen_plugin itemNickname- as in your screen name that you created using the plugin. It will self populate. classFileName: Swipegesture LocalFileName: sample.html- I use BT sample to test it Let me know how you go, but I'm off to bed sorry. Let me know if the error changes also or if it's the same thing. Did you also change the @implementation? Cheers Christine
 
Cyrus_8888
I hate code!
Profile
Posts: 151
Reg: Dec 24, 2011
Sydney
1,610
like
09/07/12 06:12 AM (13 years ago)
Hi Christine, Thanks for your help Good night and take care I'll start everything over again, help it works Thanks Cyrus
 
Cyrus_8888
I hate code!
Profile
Posts: 151
Reg: Dec 24, 2011
Sydney
1,610
like
09/08/12 01:47 AM (13 years ago)
Hi Christine, How are you? I've tried everything I can, but just can't figure it out. If its okay for you. Can I send you an email? Probably its lot more easier for you to fix it from your end? Please let me know Thanks Cyrus
 
Cyrus_8888
I hate code!
Profile
Posts: 151
Reg: Dec 24, 2011
Sydney
1,610
like
09/11/12 04:46 AM (13 years ago)
Hi Christine, Any luck? Cheers Cyrus
 
OrchardApps
Code is Art
Profile
Posts: 115
Reg: Jan 11, 2012
Brisbane austra...
5,850
like
09/11/12 05:03 AM (13 years ago)
Hi, Send me your files to Sorry - I've been flat out with other work and big deadline. Chris
 
Annonymous
Profile
like
09/11/12 05:41 AM (13 years ago)
Hi Christina, No problem at all. Good to know, thanks for your help! Email sent. My email is [email protected], just in case you didn't receive it. Thx Cyrus
 
OrchardApps
Code is Art
Profile
Posts: 115
Reg: Jan 11, 2012
Brisbane austra...
5,850
like
09/11/12 01:21 PM (13 years ago)
Hi, I got it thanks. I'll take a look tonight. I would take your email out of the post? I edited mine out. C
 
Cyrus_8888
I hate code!
Profile
Posts: 151
Reg: Dec 24, 2011
Sydney
1,610
like
09/11/12 05:50 PM (13 years ago)
Hi Christine, Thanks! No rush, please take your time. I must post my last comment while I was log out. It shows Anonymous user. BT don't allows me to alter them. Nevermind, just leave it as it is. Thx Cyrus
 

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.