Changed comments from NSClassname to Classname

This commit is contained in:
Goktug Yilmaz 2016-11-03 18:56:29 +02:00
parent 545280584f
commit cece3c172a
5 changed files with 11 additions and 11 deletions

View File

@ -1,5 +1,5 @@
//
// NSBundleExtensions.swift
// BundleExtensions.swift
// EZSwiftExtensions
//
// Created by chenjunsheng on 15/11/25.
@ -12,14 +12,14 @@ public extension Bundle {
/// EZSE: load xib
// Usage: Set some UIView subclass as xib's owner class
// NSBundle.loadNib("ViewXibName", owner: self) //some UIView subclass
// Bundle.loadNib("ViewXibName", owner: self) //some UIView subclass
// self.addSubview(self.contentView)
public class func loadNib(_ name: String, owner: AnyObject!) {
_ = Bundle.main.loadNibNamed(name, owner: owner, options: nil)?[0]
}
/// EZSE: load xib
/// Usage: let view: ViewXibName = NSBundle.loadNib("ViewXibName")
/// Usage: let view: ViewXibName = Bundle.loadNib("ViewXibName")
public class func loadNib<T>(_ name: String) -> T? {
return Bundle.main.loadNibNamed(name, owner: nil, options: nil)?[0] as? T
}

View File

@ -1,5 +1,5 @@
//
// NSDateExtensions.swift
// DateExtensions.swift
// EZSwiftExtensions
//
// Created by Goktug Yilmaz on 15/07/15.
@ -8,7 +8,7 @@
import UIKit
extension Date {
/// EZSE: Initializes NSDate from string and format
/// EZSE: Initializes Date from string and format
public init?(fromString string: String, format: String) {
let formatter = DateFormatter()
formatter.dateFormat = format
@ -19,7 +19,7 @@ extension Date {
}
}
/// EZSE: Initializes NSDate from string returned from an http response, according to several RFCs
/// EZSE: Initializes Date from string returned from an http response, according to several RFCs
public init? (httpDateString: String) {
if let rfc1123 = Date(fromString: httpDateString, format: "EEE',' dd' 'MMM' 'yyyy HH':'mm':'ss zzz") {
self = rfc1123
@ -37,7 +37,7 @@ extension Date {
return nil
}
/// EZSE: Converts NSDate to String
/// EZSE: Converts Date to String
public func toString(dateStyle: DateFormatter.Style = .medium, timeStyle: DateFormatter.Style = .medium) -> String {
let formatter = DateFormatter()
formatter.dateStyle = dateStyle
@ -45,7 +45,7 @@ extension Date {
return formatter.string(from: self)
}
/// EZSE: Converts NSDate to String, with format
/// EZSE: Converts Date to String, with format
public func toString(format: String) -> String {
let formatter = DateFormatter()
formatter.dateFormat = format

View File

@ -1,5 +1,5 @@
//
// NSTimerExtensions.swift
// TimerExtensions.swift
// EZSwiftExtensions
//
// Created by Lucas Farah on 15/07/15.

View File

@ -1,5 +1,5 @@
//
// NSURLExtensions.swift
// URLExtensions.swift
// EZSwiftExtensions
//
// Created by furuyan on 2016/01/11.

View File

@ -1,5 +1,5 @@
//
// NSUserDefaultsExtension.swift
// UserDefaultsExtension.swift
// EZSwiftExtensions
//
// Created by Vinay on 12/1/15.