Latest 0.2.2
Homepage https://github.com/gunturprasojo/Jatis-iOS
License MIT
Platforms ios 10.2
Frameworks UIKit
Authors

Jatis-iOS

Jatis-iOS

Requirements

  • iOS 10.2 (Minimum) – iOS 12.2 (Recommended)
  • Swift 4.2
  • XCode 10

Installation

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

pod 'Jatis-iOS' , '0.2.0'

Feature

  • Banner
  • Shadow
  • Textfield

Overview

How To Use

1. Import API :

import Jatis_iOS

2. Adding banner :

let jatisBanner = JatisBanner()
firstBannerView.layoutIfNeeded()
        jatisBanner.images = images
        jatisBanner._id = _id
        jatisBanner.aspectRatio = 9/16
        jatisBanner.animate = true
        jatisBanner.cornerRadius = 20
        jatisBanner.size = firstBannerView.bounds.size
        jatisBanner.animationInterval = 3.0
        jatisBanner.reloadBanner()
        firstBannerView.addSubview(jatisBanner)
        firstBannerView.addRoundShadow(fillColor: .white, cornerRadius: 20, 
                    shadowColor: .black, shadowOpacity: 0.9, shadowOffSet: CGSize(width: 4, height: 5), 
                    shadowRadius: 15, scale: 1)
        jatisBanner.tag = 1
        jatisBanner.delegate = self
        self.firstBannerView.addSubview(jatisBanner)

3. Adding shadow :

firstBannerView.addRoundShadow(fillColor: .white,
                             cornerRadius: 50,
                             shadowColor: .black,
                             shadowOpacity: 0.8,
                             shadowOffSet: CGSize(width: -5, height: 2),
                             shadowRadius: 5,
                             scale: 1)

4. Action Handling (If Image Clicked)

extension ViewController : JatisBannerProtocol {
    func didSelectBanner(_ data: String, tagBanner  : Int) {
        print("(data) & (tagBanner)")
    }
}

5. Adding TextField

@IBOutlet var textFieldView: UIView!
@IBOutlet var labelView: UILabel!

override func viewDidLoad() {
    super.viewDidLoad()
    self.generateTextFieldView()
}

func generateTextFieldView(){
      var usernameTextfield = JatisTextField()
      usernameView.layoutIfNeeded()
      usernameTextfield.tagTextfield = 1
      usernameTextfield.textPlaceholder = "Username"
      usernameTextfield.size = usernameView.bounds.size
      usernameTextfield.fontPlaceholder = UIFont(name: "Futura", size: 14)!
      usernameTextfield.textColor = .darkText
      usernameTextfield.doneButtonColor = .blue
      usernameTextfield.placeHolderBeforeColor = .lightGray
      usernameTextfield.labelPlaceholder.textAlignment = .left
      usernameTextfield.textField.textAlignment = .left
      usernameTextfield.delegate = self
      usernameTextfield.setJatisTextField()
      usernameView.addSubview(usernameTextfield)
}

6. Action Handling TextField

extension ViewController : JatisTextFieldProtocol {
   func didJatisTextBeginEditing(_ data: String, tagTextField: Int) {

    }

    func didJatisTextEndEditing(_ data: String, tagTextField: Int) {

    }

    func didJatisTextChange(_ data: String, tagTextField: Int) {

    }
}

GIF Demo

Jatis-iOS

Example

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

Author

Guntur Budi, [email protected]

License

Jatis-iOS is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Jatis-iOS",
    "version": "0.2.2",
    "summary": "A library for iOS project with Jatis Configuration",
    "description": "A library iOS project with Jatis standard development guides.",
    "homepage": "https://github.com/gunturprasojo/Jatis-iOS",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Guntur Budi": "[email protected]"
    },
    "source": {
        "git": "https://github.com/gunturprasojo/Jatis-iOS.git",
        "tag": "0.2.2"
    },
    "platforms": {
        "ios": "10.2"
    },
    "source_files": [
        "JatisView/**/*",
        "JatisBanner/**/*",
        "JatisTextField/**/*"
    ],
    "swift_version": "4.2",
    "resources": "JatisTextField/AssetTextField/*.png",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This