Sidebox
在视图右侧设置了一个名为Sidebox
的scrollView
Sidebox
使用户能够
iOS: 8.0
cocoapods: 0.36.0
可以通过CocoaPods安装Sidebox。要安装它,只需将以下行添加到Podfile中
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
pod "Sidebox"
要运行示例项目,请克隆仓库,然后首先从Example目录运行pod install
以下是如何引入Sidebox
到您的项目的简单介绍
import UIKit
import Sidebox
class ViewController: SBViewController {
...
}
开发人员应按照以下方式设置SBView(用户可以通过拖动手势控制):
let view = SBView(frame: CGRectMake(x, y, width, height))
view.delegate = self
view.setIcon(UIImage)
view.setDict([String: AnyObject])
self.view.addSubview(view)
Delegate方法如下
// called when SBView is user hold
override func editModeStart(view: SBView) {
...
}
// called when SBView is user release
override func editModeEnd(view: SBView) {
...
}
// called when SBIconView in sidebox is tapped
override func iconTapped(data: SBDataObject) {
...
}
Takeshi Ihara, [email protected]
Keisuke Toyoshima, [email protected]
Copyright 2015 RECRUIT LIFESTYLE CO., LTD.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://apache.ac.cn/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.