Latest 0.1.4
Homepage https://github.com/noumankhan71/wibaseuicomponents
License MIT
Platforms ios 10.0, requires ARC
Dependencies wicommon
Frameworks UIKit, LocalAuthentication, AVFoundation
Authors

WIBaseUIComponents

WIBaseUIComponents adds up extra features to bae WI base UI components. The components those are modified and can be use is storyboard are:

  1. WIButton (Set cornerRadius, borderRadius and borderColour in storyboard).
  2. WIImageView (Set cornerRadius, borderRadius and borderColour in storyboard).
  3. WINavigationView (Top navigation bar with left and right button extras available from storyboard).
  4. WITextViewField (Extras accessable from storyboard).
  5. WIViewController (Help setting up a background throughout the app).
  6. WIAlertManager (Show alerts and toast massages with customised parameters).

WIBaseUIComponents depends on WI Core library WICommon, that helps change the font of any UI component library depending on WICommon theme (font and color). Please check out following for more information:

It is compatible with iOS (10.0+)

Supporting WIBaseUIComponents

Please don’t forget to the repo. This increases its visibility and encourages others to contribute. Thanks

Installation

Manual

Just drop the WIBaseUIComponents folder into your project. That’s it!

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. To install WIBaseUIComponents library with CocoaPods:

  1. Make sure CocoaPods is installed.

  2. Update your Podfile to include the following:
use_frameworks!
pod 'wibaseuicomponents'
  1. Run pod install.

  2. In your code import WIBaseUIComponents like so:
import wibaseuicomponents

Example – Setup background image throughout the app

Inherit your view controller classes with WIViewController.

class ViewController : WIViewController

and change the background image in whole app

WIViewController.backgroundImage = "background.png"

to remove already setup background image:

WIViewController.backgroundImage = nil

Example – Alerts and Toast messages

To show a customised alert popup on window:

//Simple Alert with OK Button
WIAlertManager.showSimpleAlert(title: <Text>, message: <Text>)

//Alert with single block
WIAlertManager.showOneActionAlert(title: <text>, message: <Text>, primaryButton: <Primary Button Text>) {
    //write block code here
}

and for toast messages

//Show a simple toast message for 5 seconds
WIAlertManager.showToast(message: <Text>)

//Show simple toast message with customised time
WIAlertManager.showToast(message: <Text>, dismissDelay: <TimeInterval>)

and for Action Sheet

WIAlertManager.showActionSheet(title: <Text>, message: <Text>, primaryButton: <Text>, primaryCompletion: <block>, secondaryButtonArray: [<Text Array>],secondaryCompletion:  { (value) in
    //write code for the button selected
})

Want to help?

Got a bug fix, or a new feature? Create a pull request and go for it!

Author

noumankhan71, [email protected]

License

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

Cheers,
Nouman

Latest podspec

{
    "name": "wibaseuicomponents",
    "version": "0.1.4",
    "summary": "Core WI Base UI Components",
    "homepage": "https://github.com/noumankhan71/wibaseuicomponents",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "noumankhan71": "[email protected]"
    },
    "source": {
        "git": "https://github.com/noumankhan71/wibaseuicomponents.git",
        "tag": "0.1.4"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "wibaseuicomponents/Classes/**/*",
    "resources": "wibaseuicomponents/Assets/**/*",
    "requires_arc": true,
    "frameworks": [
        "UIKit",
        "LocalAuthentication",
        "AVFoundation"
    ],
    "dependencies": {
        "wicommon": []
    }
}

Pin It on Pinterest

Share This