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 CenteredTextView: UITextView { | |
override init(frame: CGRect, textContainer: NSTextContainer?) { | |
super.init(frame: frame, textContainer: textContainer) | |
setup() | |
} | |
required init?(coder: NSCoder) { | |
super.init(coder: coder) |
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
// | |
// ViewController.swift | |
// ButtonsAnimate | |
// | |
// Created by LEE HAEUN on 2019/12/12. | |
// Copyright © 2019 LEE HAEUN. All rights reserved. | |
// | |
//코드 설명 | |
//submit 버튼을 누르면 scrollview가 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
// | |
// ViewController.swift | |
// testProj | |
// | |
// Created by LEE HAEUN on 09/10/2019. | |
// Copyright © 2019 LEE HAEUN. All rights reserved. | |
// | |
import UIKit |
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 | |
import SnapKit | |
import RxSwift | |
import RxCocoa | |
/// 공지사항 뷰컨트롤러 | |
class SettingNoticeViewController: UIViewController { | |
let disposeBag = DisposeBag() | |
let viewModel = SettingAnnounceViewModel() | |
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
// | |
// TableViewBackgroundView.swift | |
// Fitco | |
// | |
// Created by OOPSLA on 25/05/2019. | |
// Copyright © 2019 Cho. All rights reserved. | |
// | |
import Foundation | |
class tableViewBackGroundView: UIView { |
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 LoadingViewWithLogo: NSObject { | |
private static let shared = LoadingViewWithLogo() | |
private var backView: UIView? | |
private var fitcoLogoImageView: UIImageView? | |
private override init() { } | |
static func show() { | |
let backView = UIView(frame: .zero) | |
backView.backgroundColor = UIColor.black.withAlphaComponent(0.4) | |
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
extension UIImage { | |
func resized(toWidth width: CGFloat) -> UIImage? { | |
let canvasSize = CGSize(width: width, height: CGFloat(ceil(width/size.width * size.height))) | |
UIGraphicsBeginImageContextWithOptions(canvasSize, false, scale) | |
defer { UIGraphicsEndImageContext() } | |
draw(in: CGRect(origin: .zero, size: canvasSize)) | |
return UIGraphicsGetImageFromCurrentImageContext() | |
} | |
func resizedImageWith(targetSize: CGSize) -> UIImage { | |
let imageSize = self.size |
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 | |
var str = "Hello, playground" | |
var date = "20190801" | |
let formatter = DateFormatter() | |
formatter.dateFormat = "yyyyMMdd" | |
formatter.date(from: date) | |
formatter.string(from: Date()) |
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
extension UIImage { | |
func fixedOrientation() -> UIImage { | |
if imageOrientation == UIImageOrientation.Up { | |
return self | |
} | |
var transform: CGAffineTransform = CGAffineTransformIdentity | |
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
// | |
// ViewController.swift | |
// testWeb | |
// | |
// Created by LEE HAEUN on 2019/07/18. | |
// Copyright © 2019 LEE HAEUN. All rights reserved. | |
// | |
import UIKit | |
import WebKit |