侧边栏 1.0.3

侧边栏 1.0.3

测试已测试
Lang语言 SwiftSwift
许可证 MIT
发布上次发布2015年10月
SPM支持SPM

Nonchalant维护。




侧边栏 1.0.3

Sidebox

概览

Sidebox在视图右侧设置了一个名为Sidebox的scrollView

Sidebox使用户能够

  • 临时存储
  • 在单一视图中快速对比

Animation

要求

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.