Latest 0.1.9
Homepage https://github.com/draupnir45/FlameKit
License MIT
Platforms ios 9.0
Frameworks UIKit
Authors

FlameKit🔥

Version
License
Platform

한글 설명은 여기

Summary

FlameKit is collection of simple custom UIs. For version 0.1.0, It offers three Classes & one util. FlameScrollView, FlameNavigationBar, FlameButton & new FlameScreenUtil

FlameScrollView

FlameScrollView is subclass of UIScrollView which has UIStackView(vertical) as a built-in subview. It’s seats somewhere between UIScrollView and UITableView. If you want to add vertical stack simply call addArrangedSubview(_:animated:horizontalInset:height:) to the instance of FlameScrollView. FlameScrollView also automatically listen to the keyboard show/hide notification.

Usage

let scrollView = FlameScrollView(frame: view.bounds)
scrollView.addArrangedSubview(subView1)
scrollView.addArrangedSubview(subView2)
scrollView.addMarginStack(height: 16.0) // adding margin

FlameNavigationBar

FlameNavigationBar is UIView-based customizable NavigationBar. FlameNavigationBar supports iOS 11 style LargeTitle and collapsing. It’s compatible with scrollview. (FlameNavigationBar need to be a delegate of scrollView.)

Usage

let navigationBar = FlameNavigationBar()
navigationBar.title = "View Title"
scrollView.delegate = navigationBar
navigationBar.scrollView = scrollView
scrollView.contentInset.top = navigationBar.frame.height

FlameButton

FlameButton is UIView-based button that uses closure, not selector.

Usage

let button = FlameButton()
let customView = UIView() // draw whatever you want.

button.action { (button) in
  print("button is tapped!") //when button tapped.
}

button.setCustomView(customView) { (isSelected, isEnabled) in // control appearance here.
  if isSelected {
    customView.backgroundColor = .red
  } else {
    customView.backgroundColor = .blue
  }

  if isEnabled {
    label.alpha = 1.0        
  } else {
    label.alpha = 0.5
  }
}

FlameScreenUtil

FlameScreenUtil is collection of simple getters for dealing with various iphone screen sizes.

Supporting Sizes

  • iPhone1 – 320 x 480 (iPhone 2G ~ iPhone 4S)
  • iPhone5 – 320 x 568 (iPhone 5 ~ iPhone SE)
  • iPhone6 – 375 x 667 (iPhone 6 ~ iPhone 8)
  • iPhone6Plus – 414 x 736 (iPhone 6+ ~ iPhone 8+)
  • iPhoneX – 375 x 812 (iPhone X)

Usage

switch UIScreen.flm.screenType { 
case .iPhone6Plus:
// setting for iPhone 6 Plus..
case .iPhoneX:
// setting for iPhone X..
default:
// setting for others...
}

if UIScreen.flm.isIphoneX {
//setting specific for iPhone X..
}

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • Swift 4.0 +
  • iOS 9.0 +

Installation

FlameKit is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'FlameKit'

Using Objective-C?

Install pod first. then on your .h file,

@import FlameKit;

Update

  • 0.1.9 : Add ‘isEnabled’ function to FlameButton

Author

Jongchan Mark Park, [email protected]

License

FlameKit is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "FlameKit",
    "version": "0.1.9",
    "summary": "StackView + ScrollView, simplified.",
    "description": "FlameKit is collection of simple custom UIs. For version 0.1.0, it offers FlameNavigationBar, FlameScrollView & FlameButton. nnFlameScrollView is subclass of UIScrollView which has UIStackView(vertical) as a built-in subview. It's seats somewhere between UIScrollView and UITableView. If you want to add vertical stack simply call addArrangedSubview(_:animated:horizontalInset:height:) to the instance of FlameScrollView. FlameScrollView also automatically listen to the keyboard show/hide notification.nnFlameNavigationBar is UIView-based customizable NavigationBar. FlameNavigationBar supports iOS 11 style LargeTitle and collapsing. It's compatible with scrollview. (FlameNavigationBar will be a delegate of scrollView... It will be fixed in future update.)",
    "homepage": "https://github.com/draupnir45/FlameKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Jongchan Park": "[email protected]"
    },
    "source": {
        "git": "https://github.com/draupnir45/FlameKit.git",
        "tag": "0.1.9"
    },
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "4.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "FlameKit/**/*",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This