Featured Posts
Sports
Games
Friday, May 12, 2017
How to Create a WEB VIEW in Swift IOS
import UIKit
import WebKit
class ViewController: UIViewController, UIWebViewDelegate {
var webView: UIWebView!
override func viewDidLoad() {
super.viewDidLoad()
webView = UIWebView(frame: UIScreen.main.bounds)
webView.delegate = self
view.addSubview(webView)
if let url = URL(string: "http://omnipopmag.com") {
...
Read moreFriday, February 10, 2017
How to Decode a String Except Html Tags Using Swift Language
1.Create a Header Class Name as Helper.Swift
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008400}
span.s1 {font-variant-ligatures: no-common-ligatures}
// Helper.swift
static func toString(_ parameter: Any?, defaultValue: String = "") -> String
{
if let stringValue = parameter as? String...
Read moreHow to use Long Press Gesture in TableView Using Swift Language
1.Add Delegate to View Controller Class
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #703daa}
span.s1 {font-variant-ligatures: no-common-ligatures; color: #ba2da2}
span.s2 {font-variant-ligatures: no-common-ligatures; color: #000000}
span.s3 {font-variant-ligatures: no-common-ligatures}
span.s4 {font-variant-ligatures: no-common-ligatures; color: #4f8187}
class ViewController:...
Read moreHow to User Refresh Controller in pagination Using Swift
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #000000}
span.s1 {font-variant-ligatures: no-common-ligatures}
span.s2 {font-variant-ligatures: no-common-ligatures; color: #ba2da2}
span.s3 {font-variant-ligatures: no-common-ligatures; color: #703daa}
var offsetValue: NSInteger!
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px...
Read moreHow to Get Hex String to Color in Swift
reate A Categeory Class
// UIolor+CustomUIColor.swift
extension UIColor
{
convenience init(hex: Int)
{
self.init(hex: hex, alpha: 1)
}
convenience init(hex: Int, alpha: Double)
{
self.init(
...
Read moreHow to Make UIFont Extension in Swift
Create A Categeory Class
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008400}
span.s1 {font-variant-ligatures: no-common-ligatures}
// UIFont+CustomTextFont.swift
extension UIFont
{
class func regularFont(_ size: CGFloat) -> UIFont
{
return UIFont(name: "Lato-Regular", size: size)!
...
Read moreHow to Create a Left & Right Slide Menu Using Swift
Step 1:
Create a header class as SlideMenuController.swift
Add the Below SlideMenuController.swift Source Code .
//
// SlideMenuController.swift
//
// Created by Sravan Kumar
//
import Foundation
import UIKit
@objc public protocol SlideMenuControllerDelegate
{
@objc optional func leftWillOpen()
@objc optional func...
Read more
Subscribe to:
Posts
(
Atom
)