This file contains hidden or 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
| //Trigger observer to perform UI update like refresh listing in App | |
| dispatch_async(dispatch_get_main_queue(), ^(void) { | |
| [[NSNotificationCenter defaultCenter] postNotificationName:@"productListUpdatedWithProductsList" object:nil]; | |
| }); | |
| //Adding observer in listner Class in ViewDidLoad() | |
| [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadFriendRequestSent) name:@"productListUpdatedWithProductsList" object:nil]; |
This file contains hidden or 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
| //Generic to swap values of two variables regardless of their data type | |
| func genericSwap<T>(inout a:T,inout b: T) | |
| { | |
| let temp = a | |
| a = b | |
| b = temp | |
| } |
This file contains hidden or 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
| Open terminal and in your project go to the folder where fabric framework exist.if you are using pods then fabric will be inside pod folder. | |
| Run below commands in terminal once you have reached the folder path to fabric | |
| sudo chmod 777 run | |
| sudo chmod 777 uploadDSYM | |
This file contains hidden or 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
| func renameFile(oldName:String , newName : String){ | |
| do { | |
| let originPath = (self.getDirectoryPath() as NSString).appendingPathComponent(oldName) | |
| let destinationPath = (self.getDirectoryPath() as NSString).appendingPathComponent(newName) | |
| try FileManager.default.moveItem(at: URL(fileURLWithPath: originPath), to: URL(fileURLWithPath: destinationPath)) | |
| } catch { |
This file contains hidden or 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
| // | |
| // SelfSizedTableView.swift | |
| // AdjustableTableView | |
| // | |
| // Created by Dushyant Bansal on 25/02/18. | |
| // Copyright © 2018 db42.in. All rights reserved. | |
| // | |
| import UIKit |
OlderNewer