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 FBSnapshotTestCase | |
@testable import FBSnapshotTestCaseExample | |
class FBSnapshotTestCaseExampleTests: FBSnapshotTestCase { | |
override func setUp() { | |
super.setUp() | |
self.recordMode = false | |
} | |
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 SnapKit | |
class ViewController: UIViewController { | |
lazy var titleLabel = UILabel() | |
lazy var mainImageView = UIImageView() | |
lazy var registerButton = UIButton() | |
lazy var loginButton = UIButton() | |
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
#!/bin/bash | |
# Script configuration | |
devicesArray=( | |
"iPhone 8" | |
"iPhone 8 Plus" | |
"iPhone 5s" | |
"iPhone X") |
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 ItemsViewController: UIViewController { | |
@IBOutlet private weak var itemsTableView: UITableView! | |
private var items = [Item]() | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
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 ItemsViewController: UIViewController { | |
@IBOutlet private weak var itemsTableView: UITableView! | |
private var itemsInteractor = ItemsInteractor() | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
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 ItemsInteractor { | |
private var items = [Item]() | |
func loadData() { | |
items.append(Item(name: "Apple", image: UIImage(named: "apple")!)) | |
items.append(Item(name: "Banana", image: UIImage(named: "banana")!)) | |
items.append(Item(name: "Potato", image: UIImage(named: "potato")!)) |
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 ItemsViewController: UIViewController { | |
@IBOutlet private weak var itemsCollectionView: UICollectionView! | |
private var itemsInteractor = ItemsInteractor() | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
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 TwitterKit | |
class RetweetViewController: UIViewController { | |
@IBOutlet private weak var tweetIdTextField: UITextField! | |
@IBAction private func didSelectRetweet(sender: UIButton) { | |
guard let tweetId = tweetIdTextField.text else { return } | |
let client = TWTRAPIClient() |
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 TwitterKit | |
class RetweetViewController: UIViewController { | |
@IBOutlet private weak var tweetIdTextField: UITextField! | |
let client = TWTRAPIClient().withCurrentUser() | |
@IBAction private func didSelectRetweet(sender: UIButton) { |
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
require('dotenv').load(); | |
var Twitter = require('twitter'); | |
var client = new Twitter({ | |
consumer_key: process.env.TWITTER_CONSUMER_KEY, | |
consumer_secret: process.env.TWITTER_CONSUMER_SECRET, | |
bearer_token: process.env.TWITTER_BEARER_TOKEN | |
}); |
OlderNewer