Files
Timothy Moose da60aac640 Add support for view controller presentation (#198)
* Add support for view controller presentation

* Update comments

* Implement review feedback

* Implement review feedback

* Add segue identifier

* Mostly working

* Bug fixing

* Round corners using squicles

* Support squircles and tab layout for view controlllers

* Remove internal deprecation warnings

* Tweak colors

* Bug fixes

* Animate mask layer on rotation events

* Preserve preferred height of view controller

* Add framework for segue convenience classes

* Share segue extras scheme

* Fix segue framework compile

* Deintegrate CocoaPods from demo projects

Had to do this to work with Carthage due to a bug https://github.com/Carthage/Carthage/issues/2549

* Add auto-rubber banding

* Update code comments

* Documentation updates

* More documentation

* Debugging docs

* Debug docs

* Debug docs

* Debug docs

* Debug docs

* Asset update

* Doc updates

* Update ViewControllers.md

* Update ViewControllers.md

* Update ViewControllers.md

* Update ViewControllers.md

* Update ViewControllers.md

* Update ViewControllers.md

* Update ViewControllers.md

* Update ViewControllers.md

* Update ViewControllers.md

* Update ViewControllers.md

* Update ViewControllers.md

* Update ViewControllers.md

* Update ViewControllers.md

* Update ViewControllers.md

* Update ViewControllers.md

* Update ViewControllers.md

* Update ViewControllers.md

* Update ViewControllers.md

* Update ViewControllers.md

* Update ViewControllers.md

* Update docs

* Update ViewControllers.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Simlify MarginAdjustable protocol

* Update customization section

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update docs

* Update changelog

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Reduce banner image size

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update layouts

* Fix backward compatibility bug

* Fix CocoaPods integration

* Remove debug code

* Add link
2018-08-26 20:09:13 -05:00

36 lines
1.1 KiB
Swift

//
// MessagesViewController.swift
// iMessageDemo
//
// Created by Timothy Moose on 5/25/18.
// Copyright © 2018 SwiftKick Mobile. All rights reserved.
//
import UIKit
import Messages
import SwiftMessages
class MessagesViewController: MSMessagesAppViewController {
@IBOutlet weak var button: UIButton! {
didSet {
button.layer.cornerRadius = 5
}
}
@IBAction func buttonTapped() {
let messageView: MessageView = MessageView.viewFromNib(layout: .centeredView)
messageView.configureContent(title: "Test", body: "Yep, it works!")
messageView.button?.isHidden = true
messageView.iconLabel?.isHidden = true
messageView.iconImageView?.isHidden = true
messageView.configureTheme(backgroundColor: .black, foregroundColor: .white)
messageView.configureDropShadow()
messageView.configureBackgroundView(width: 200)
var config = SwiftMessages.defaultConfig
config.presentationStyle = .center
config.presentationContext = .viewController(self)
SwiftMessages.show(config: config, view: messageView)
}
}