To overcome that issue go to xib/ storyboard File Inspector – identity and type tab, move to interface builder document just select open in Xcode 7.1. Please find attached for more detail.
iPhone
Use iPhone as Server Using CocoaAsyncSocket Framework
CocoaAsyncSocket provides easy-to-use and powerful asynchronous socket libraries for Mac and iOS. The classes are described below. The CocoaAsyncSocket library comes into play when we have to deal with sockets, ports, and connections. It also helps us with sending data from one end of the …
Username Validation without space and max length
Call function from text field delegate method and get valid username. let USERNAMERANGE = “ABCDEFGHIJKLMONPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.” let KALERTVALIDUSERNAME = “Username can only use letters, numbers, underscore and periods.” public func setUsernameFormate(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String)-> Bool{ var strUserName = textField.text! as …
How to store username/password in keychain for security purpose?
You should always use Keychain to store usernames and passwords, and since it’s stored securely and only accessible to your app, there is no need to delete it when app quits (if that was your concern). Apple provides sample code that stores, reads and deletes …
Strong Password Validation
public func isValidPassword(strPassword : String) -> Bool{ let charactersetspecialcharacter = CharacterSet(charactersIn: “abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLKMNOPQRSTUVWXYZ0123456789”) if strPassword.rangeOfCharacter(from: charactersetspecialcharacter.inverted) == nil { return false } let capitalLetterRegEx = “.*[A-Z]+.*” let textcapitallattertest = NSPredicate(format:”SELF MATCHES %@”, capitalLetterRegEx) …
Image Caching With AFNetworking causes memory warning in UICollectionView
We have use SDWebImage instead of AFNetworking to handle memory warning. You can find swift code from below link. here is below code: [imageView sd_setImageWithURL:[NSURL URLWithString:@”http://www.domain.com/path/to/image.jpg”] placeholderImage:[UIImage imageNamed:@”placeholder.png”]]; // Some time may possible that this cause memory warning than use below code to overcome(This causes …
UIView Extension with support CornerRadius, borderWidth, borderColor, roundCorners, shadowColor, shadowOpacity, shadowOffset, shadowRadius.
While we want to set uiview property (like CornerRadius, borderWidth, borderColor, roundCorners, shadowColor, shadowOpacity, shadowOffset, shadowRadius) at that time we use code or user defined runtime attribute for that but using this extension we can esily update property from attribute inspector. code support SWIFT 3.0 …
Switching View controller
Issue: I have three View Controller class and also have one navigation Controller . I have push from second view controller class to third view controller class and when back form third view controller that time it is every time pop to second view controller …
GPUImage New Distortion Filter
Touch Moved Method in our View Controller -(void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event { if (TouchEnable) { UITouch *touch = [touches anyObject]; CGPoint touchPoint = [touch locationInView:_img_view]; @autoreleasepool { double dx = fabs(BeginPoint.x – touchPoint.x); …
Openurl freezes app for approx 10 seconds
We have resolved this issue using performselector and inside that method use dispatch_async. [self performSelector:@selector(methodToRedirectToURL) withObject:url afterDelay:0.1]; -(void)methodToRedirectToURL{ dispatch_async(dispatch_get_main_queue(), ^{ [[UIApplication sharedApplication] openURL:url]; }); }