Discussion Forums  >  Uncategorized

Replies: 1    Views: 231

dolfinsfan23
I hate code!
Profile
Posts: 24
Reg: Jul 28, 2011
Miami
240
09/21/11 02:08 PM (14 years ago)

custom plugin

ok, so i want a custom screen to open when i select a button. here are the files i have created in the Plugins folder of the app. How would i get this to work? A: myPlugin.h #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #import BT_viewController.h @interface myPlugin : BT_viewController { } IBOutlet UIWebView *webPage; } -(IBAction) buttonPressed:(id)mode; -(IBAction) buttonPressed2:(id)psalms; -(IBAction) buttonPressed3:(id)gospel; -(IBAction) buttonPressed4:(id)absolution; @end and myPlugin.m -(IBAction) buttonPressed:(id)mode { [webPage stringByEvaluatingJavaScriptFromString:@javascript:$('#toggler').click();]; } -(IBAction) buttonPressed2:(id)psalms { [webPage stringByEvaluatingJavaScriptFromString:@javascript:window.location.href='#Psalms']; } -(IBAction) buttonPressed3:(id)gospel { [webPage stringByEvaluatingJavaScriptFromString:@javascript:window.location.href='#Gospel']; } // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [webPage loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@http://m.davidtheprophet.com/Agpeya/First%20Hour.htm]]]; [super viewDidLoad]; @end
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
06/18/12 07:29 AM (13 years ago)
Have you taken a look at the empty plugin? You can enter the code there :) Take care, David http://buzztouchmods.com
 

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.