Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/layneios/lnprotocolview
A light weight agree or not protocol view.
https://github.com/layneios/lnprotocolview
objective-c protocol protocolview
Last synced: 5 days ago
JSON representation
A light weight agree or not protocol view.
- Host: GitHub
- URL: https://github.com/layneios/lnprotocolview
- Owner: layneios
- License: mit
- Created: 2017-06-26T03:46:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-19T06:24:32.000Z (over 7 years ago)
- Last Synced: 2024-10-31T15:34:51.943Z (5 days ago)
- Topics: objective-c, protocol, protocolview
- Language: Objective-C
- Homepage:
- Size: 133 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LNProtocolView
[![Version](https://img.shields.io/cocoapods/v/LNProtocolView.svg?style=flat)](http://cocoapods.org/pods/LNProtocolView)
[![License](https://img.shields.io/cocoapods/l/LNProtocolView.svg?style=flat)](http://cocoapods.org/pods/LNProtocolView)
[![Platform](https://img.shields.io/cocoapods/p/LNProtocolView.svg?style=flat)](http://cocoapods.org/pods/LNProtocolView)## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
```objc
LNProtocolView *protocolView = [[LNProtocolView alloc] initWithFrame:CGRectZero];
protocolView.backgroundColor = [UIColor groupTableViewBackgroundColor];
[protocolView setPrefixStr:@"这里是前缀"
suffixStr:@"这里是后缀哈哈哈"
protocolArray:@[@{ProtocolViewNameKey:@"《这里是协议》",
ProtocolViewLinkKey:@"https://www.baidu.com"}]
textColor:[UIColor darkTextColor]
protocolTextColor:[UIColor blueColor]
textFont:[UIFont systemFontOfSize:15]];
[self.view addSubview:protocolView];
protocolView.frame = CGRectMake(10, 100, 260, 10);
protocolView.jumpBlock = ^(NSString *urlStr) {
NSLog(@"%@", urlStr);
};
```![Demo](https://github.com/lengmolehongyan/LNProtocolView/blob/master/SimulatorScreenShot1.png)
## Requirements
## Installation
LNProtocolView is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "LNProtocolView"
```## Author
lengmolehongyan, [email protected]
## License
LNProtocolView is available under the MIT license. See the LICENSE file for more info.