Skip to content

Instantly share code, notes, and snippets.

@ndurell
Last active January 3, 2016 04:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ndurell/8406656 to your computer and use it in GitHub Desktop.
Save ndurell/8406656 to your computer and use it in GitHub Desktop.
This demonstrates how to instantiate and add a portal button to your a view. This uses the SMPortalButton convenience class.
#import "SMPortalButton.h"
@implementation MyViewController
- (void)viewDidLoad
{
[super viewDidLoad];
SMPortalButton *portalButton=[SMPortalButton buttonWithType:UIButtonTypeSystem];
[portalButton.button setTitle:@"Portal Button" forState:UIControlStateNormal];
portalButton.frame = CGRectMake(40, 40, 100, 30);
[self.view addSubview:portalButton];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment