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 Foundation | |
extension Calendar { | |
static func australia() -> Calendar { | |
var calendar = Calendar(identifier: .gregorian) | |
calendar.timeZone = TimeZone(abbreviation: "UTC")! | |
calendar.locale = Locale(identifier: "en_AU") | |
return calendar | |
} |
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
class PollCell: UITableViewCell { | |
var header: HeaderView! | |
var pollContent: PollMultipleChoicesView! | |
override init(style: UITableViewCellStyle, reuseIdentifier: String?) { | |
super.init(style: style, reuseIdentifier: reuseIdentifier) | |
backgroundColor = UIColor.lightGray | |
header = HeaderView() | |
contentView.addSubview(header) | |
header.snp.makeConstraints { (make) in |
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
class Table: UITableViewController { | |
override func viewDidLoad() { | |
tableView.estimatedRowHeight = 100 | |
tableView.rowHeight = UITableViewAutomaticDimension | |
tableView.translatesAutoresizingMaskIntoConstraints = false | |
} | |
override func tableView(_ tableView: UITableView, | |
numberOfRowsInSection section: Int) -> Int { | |
return 1 |
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 XCPlayground | |
import PlaygroundSupport | |
import SnapKit |
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 MobileCoreServices | |
extension String { | |
func isImageExtension(_ ext: String) -> Bool { | |
let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, ext, nil) | |
guard let imageUTI = uti?.takeRetainedValue() else { return false } | |
return UTTypeConformsTo(imageUTI, kUTTypeImage) | |
} | |
func isImageLink() -> 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 MobileCoreServices | |
extension String { | |
func isImageExtension(_ ext: String) -> Bool { | |
let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, ext, nil) | |
guard let imageUTI = uti?.takeRetainedValue() else { return false } | |
return UTTypeConformsTo(imageUTI, kUTTypeImage) | |
} | |
func isImageLink() -> 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
source 'https://bitbucket.org/jerapongn/jnspec' | |
use_frameworks! | |
target 'Newsfeed_Example' do | |
pod 'Newsfeed', :path => '../' | |
target 'Newsfeed_Tests' do | |
inherit! :search_paths | |
# pod 'FBSnapshotTestCase' |
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
Pod::Spec.new do |s| | |
s.name = 'Newsfeed' | |
s.version = '0.1.0' | |
s.summary = 'A short description of Newsfeed.' | |
s.description = <<-DESC | |
TODO: Add long description of the pod here. | |
DESC | |
s.homepage = 'https://github.com/GE-N/Newsfeed' | |
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' |
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
platform :ios, '10.0' | |
use_frameworks! | |
def core_pods | |
pod 'MyApp_API', :git => 'https://bitbucket.org/gomeeki_mobile_team/myapp-api' | |
end | |
... | |
target 'MyApp' do |
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
Pod::Spec.new do |s| | |
s.name = 'MyApp_API' | |
s.version = '0.1.0' | |
s.summary = 'A short description of MyApp_API.' | |
s.description = <<-DESC | |
TODO: Add long description of the pod here. | |
DESC | |
s.homepage = 'https://github.com/<GITHUB_USERNAME>/MyApp_API' |
NewerOlder