NLBURLAction 0.1.6

NLBURLAction 0.1.6

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Unclaimed.


Downloads

Total3
Week0
Month0

Installs

Apps1
powered by Segment

GitHub

Stars7
Watchers22
Forks0
Issues0
Contributors1
Pull Requests0

Code

Files26
LOCLines of Code 409


  • By
  • agata

NLBURLAction is a library to open custom scheme URLs easily. It can convert URL to custom scheme URL.

Screenshot

Used in Production

Requirements

  • iOS 4.3 or later
  • ARC

Usage

Instance NLBURLAction and register classes following NLBURLActionProtocol.

NSURL *url = [NSURL URLWithString:@"https://twitter.com/agata/status/451892810430439424"];
NLBURLAction *urlAction = [[NLBURLAction alloc] initWithActionClasses:@[[NLBBacklogURLAction class], [NLBTwitterURLAction class], [NLBTweetbotURLAction class]]];
NSArray *actions = [urlAction arrayURLActionsWithURL:url];

NSLog(@"count=%d", actions.count); // 2
NSLog(@"actions[0]=%@", actions[0]); // NLBTwitterURLAction
NSLog(@"actions[1]=%@", actions[1]); // NLBTweetbotURLAction

NSObject<NLBURLActionProtocol> *action = (NSObject<NLBURLActionProtocol> *)actions[0];
[action doActionURL:url]; // open Tweeter app with URL

Supported Action

Open in app

Other actions

Install

License

MIT license.