This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import ObjectiveC | |
struct AssociatedKeys { | |
static var activeTextField: UInt8 = 0 | |
static var keyboardHeight: UInt8 = 1 | |
} | |
extension UIViewController : UITextFieldDelegate { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import ObjectiveC | |
struct AssociatedKeys { | |
static var activeTextField: UInt8 = 0 | |
} | |
extension UIViewController : UITextFieldDelegate { | |
private(set) var activeTextField: UITextField? { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
self.enableUnoccludedTextField() | |
} | |
override func viewWillDisappear(_ animated: Bool) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import ObjectiveC | |
struct AssociatedKeys { | |
static var activeTextField: UInt8 = 0 | |
static var keyboardHeight: UInt8 = 1 | |
} | |
extension UIViewController : UITextFieldDelegate { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UIViewController : UITextFieldDelegate { | |
// Put some useful code here | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Example of PHP Script #1 | |
*/ | |
// Do some work... | |
// Need to send a message | |
// Create an instance of Postmaster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Letter extends Parcel { | |
private $message = ''; | |
public function setMessage($message){ | |
$this->message = $message; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
abstract class Parcel { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class LetterCarrier extends AbstractCarrier { | |
public function __construct($queueName = , $host = 'localhost', $port = 5672, $username = 'guest', $password = 'guest') { | |
parent::__construct($queueName, $host, $port, $username, $password); | |
} | |
protected function receivedParcel($msg) { | |
/* @param AMQPMessage $msg */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
abstract class AbstractCarrier { | |
protected $connection; | |
protected $channel; | |
protected $queueName; | |
public function __construct($queueName, $host = 'localhost', $port = 5672, $username = 'guest', $password = 'guest') { | |
$this->queueName = $queueName; |
NewerOlder