RNLoadingButotn(Swift) is based on RNLoadingButton write in Objective-C.
An easy-to-use UIButton subclass with an activity indicator.
The activity state is configurable and can hide the image or text while the activity indicator is displaying . You can Also choose the position of easily activity indicator or Set It up with a spacing.
- Swift 2
- Swift 1.0 (tag 0.0.1)
- Swift 1.2 (tag 2.0.0)
- iOS 8.0+ / Mac OS X 10.9+
- Xcode 7.0+
- Add a pod entry for RNActivityView to your Podfile
pod 'RNLoadingButton(Swift)'
- Install the pod(s) by running
pod install
.
- Drag RNLoadingButton.swift to your project
//Mark: Can usage with Nib
// Configure State
btn1.hideTextWhenLoading = false
btn1.loading = false
btn1.activityIndicatorAlignment = RNActivityIndicatorAlignment.Right
btn1.activityIndicatorEdgeInsets = UIEdgeInsetsMake(0, 50, 0, 10)
btn1.setTitle("connecting", forState: UIControlState.Disabled)