FUIEULAViewController
open class FUIEULAViewController : FUIWelcomeController
This UIViewController
is used to display the End User License Agreement, EULA.
There are 2 buttons on the tool bar at the bottom of the screen, Agree
and Disagree
, to let choose to
confirm or reject the agreement. In addition, there is a Cancel
button at the
left on the navigation bar.
Developer should provide the text for the headlineLabel
property, the attributed text for the eulaTextView
property,
and set the delegate property to handle user interactions.
let eulaController = FUIEULAViewController.createInstanceFromStoryboard()
eulaController.headlineLabel.text = "CUSTOM EULA"
eulaController.eulaTextView.attributedText = NSAttributedString(string: "This is a legally binding agreement (\"Agreement\") between ...", attributes: [NSAttributedStringKey.font: UIFont(name: "Georgia", size: 24.0)!
])
eulaController.delegate = self
let navController = UINavigationController.init(rootViewController: eulaController)
self.navigationController?.present(navController, animated: true, completion: nil)
Theming
fdlFUIEULAView_headlineLabel {
font-size: 28;
font-name: thinSystem;
font-color: @primary1;
}
fdlFUIEULAView_confirmButton {
background-tint-color: @tintColorDark;
}
fdlFUIEULAView_rejectButton {
background-tint-color: @tintColorDark;
}
fdlFUIEULAView_cancelButton {
background-tint-color: @tintColorDark;
}
Attention
The delegate object with type FUIEULADelegate
is declared as a weak reference. So on deallocation it will be automatically set to nil. To keep it alive as expected, developer should retain the delegate object during its whole execution scope.
-
The
UILabel
to hold the EULA title. Developer should set the text for this headline label.Declaration
Swift
@IBOutlet public private(set) weak var headlineLabel: UILabel!
-
The
UITextView
to hold the EULA text. Developer should set the text using itsattributedText
property.Declaration
Swift
@IBOutlet public private(set) weak var eulaTextView: UITextView!
-
The confirmation button. The default string is from localized strings file -
Agree
.Declaration
Swift
@IBOutlet public private(set) weak var confirmButton: UIBarButtonItem!
-
The confirmation button. The default string is from localized strings file -
Disagree
.Declaration
Swift
@IBOutlet public private(set) weak var rejectButton: UIBarButtonItem!
-
The cancel button. This is iOS system
Cancel
bar button item.Declaration
Swift
@IBOutlet public private(set) weak var cancelButton: UIBarButtonItem!
-
Undocumented
Declaration
Swift
public weak var delegate: FUIEULADelegate?
-
Creates a
FUIEULAViewController
object from storyboard.Declaration
Swift
public class func createInstanceFromStoryboard() -> FUIEULAViewController