Latest 0.3.0
Homepage https://github.com/MuhsinFatih/xName
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

CI Status
Version
License
Platform

Usage

    var views: [String: UIView] = [:]
    override func viewDidLoad() {
        ...
        views = self.view.viewsWithId() // load subviews with accessibility id

        let myButton = views["myButton"] as? UIButton // fun!
        myButton?.tintColor = .green
    }

create a UIButton and set its accessibility identifier (under identity inspector) to "myButton"

xName

Example

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

Requirements

none

Installation

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

pod 'xName'

Author

Muhsin Fatih Yorulmaz, [email protected]

License

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

Latest podspec

{
    "name": "xName",
    "version": "0.3.0",
    "swift_version": "3.2",
    "summary": "Allows accessing UI elements with identifier",
    "description": "TODO: Add long description of the pod here.nTired of creating IBOutlets every time you want to access a UI element? Then don't!nInstead use Accessibility Identifier to access UIViews!",
    "homepage": "https://github.com/MuhsinFatih/xName",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "[email protected]": "[email protected]"
    },
    "source": {
        "git": "https://github.com/MuhsinFatih/xName.git",
        "tag": "0.3.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "xName/Classes/*swift",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This