ios8

Xcode iOS 8 Keyboard types not supported

非 Y 不嫁゛ 提交于 2019-12-27 11:39:25
问题 I have a UITextField Ctrl-dragged as an @Outlet in my .swift class. Now in viewDidLoad i'm using this code self.myTextField.keyboardType = UIKeyboardType.DecimalPad When i launch my app on simulator and click on the UITextField i got this log Can't find keyplane that supports type 8 for keyboard iPhone-Portrait-DecimalPad; using 2617181025_Portrait_iPhone-Simple-Pad_Default I have no crash or something but the keyboard is not displayed. I also tried to set it from Storyboard but it's the same

Iframe scrolling iOS 8

不想你离开。 提交于 2019-12-27 11:13:09
问题 I have an iframe and i need it to have a scrolling overflow. it seems work out in desktop, i used a work around to make it work in iOS. it works on android and iOS now. however, iOS8 it fails. <html> <body> <style type="text/css"> .scroll-container { overflow: scroll; -webkit-overflow-scrolling: touch; } #iframe_survey { height: 100%; } .scroll-container { height: 100%; width: 100%; overflow: scroll; } </style> <div class="scroll-container scroll-ios"> <iframe id="iframe_survey" src="www

How to delay next action in sequence until after runBlock completes? (Swift)

ぃ、小莉子 提交于 2019-12-25 16:52:27
问题 The duration property for moveTo isn't followed when inside a runBlock , allowing the subsequent action in a sequence to get executed immediately when it should only get executed after duration seconds. Code A (sequence properly executed): let realDest = CGPointMake(itemA.position.x, itemA.position.y) let moveAction = SKAction.moveTo(realDest, duration: 2.0) itemB.runAction(SKAction.sequence([SKAction.waitForDuration(0.5), moveAction, SKAction.runBlock { itemB.removeFromParent() }])) Code B

iOS 8 Autolayout with Size Classes

 ̄綄美尐妖づ 提交于 2019-12-25 14:58:10
问题 This is driving me crazy. All I need is to align the subview to superview & fill its bounds. To do this, all I used to do is create 4 Autolayout constraints for subview in storyboard and set top, left, bottom, right margins to 0 relative to subview. But in Xcode 6, with Size classes enabled, the left and right margins default to -16 and setting them to 0 has no effect. No matter what I do, the subview never fills superview bounds and there are few pixel gaps on the left and right. How do I

iOS Creating an Object Best Practice

こ雲淡風輕ζ 提交于 2019-12-25 14:49:06
问题 I've created a wizard for user's to sign up using my app, however, I'm having some doubts as to how I should store their information along the way. I have a User model, which is filled out when users are pulled from the database, however, there are some required fields on this model that wouldn't be filled out if I were to use it as the object that is passed along as the user goes through the the wizard. Here is my User model: final class User: NSObject, ResponseObjectSerializable,

Storing iOS app's user password and username

妖精的绣舞 提交于 2019-12-25 07:52:44
问题 I am using a SQLite database to build an iOS app. Which is the best way to store username and password: in the database or the Keychain? Also, if I store any data in database how can I make it secure like the keychain? 回答1: Keychain is better. However, we recommend that you don't save the password. You should always save the hash value and compare the hashes to see if the login is correct! 回答2: Keychain is the best option to save any kind of passwords. Use library SSKeychain which is a light

How to secure or encrypt video files with NSFileManager?

余生长醉 提交于 2019-12-25 07:39:54
问题 I need to secure files in document directory or (Library directory) on iOS especially videos. I don't want user can download videos in document directory by Xcode or iExplorer app. I need to secure the private content inside of the Library directory (or) how to encrypt video file after downloading from server. Please help me on this. NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@.mp4",videoUrlName]]]; NSString* path = [NSString

iOS :: How to decompress .gz file using GZIP Utility?

℡╲_俬逩灬. 提交于 2019-12-25 07:06:19
问题 I have kept my sqlite database in the S3 server in the .gz format. When my iOS App starts, I want to download the database in .gz file and decompress it in the documents directory. Download part is working fine but decompression is not working. I tried ZipArchive, but it doesn't decompress .gz file. It is able to unzip ZIP files. Below is the code, I tried. ZipArchive *za = [[ZipArchive alloc] init]; if ([za UnzipOpenFile:filePath]) { BOOL ret = [za UnzipFileTo:destPath overWrite:YES]; [za

IBOutlet nil after instantiateViewControllerWithIdentifier

旧时模样 提交于 2019-12-25 05:31:39
问题 Not sure exactly what I'm doing wrong here. I've listed out what my problem is and my code. Would love to get some help. Thanks! Problem: VC1 presents VC2. IBOutlets from VC1 are now nil. VC2 dismisses back into VC1. IBOutlets in VC1 are still nil. VC1 loads a grid of pictures from flickR. VC2 has a searchBar controller, when VC2 is dismissed it does runs flickR query. Right before my self.collectionView.reload() fails because self.collectionView is nil :( VC1 import UIKit class

SDWebImage with PHAssets

一笑奈何 提交于 2019-12-25 04:49:35
问题 i have an application where i am loading large amount of images from database and showing them in my gallery, what i was doing earlier is i was getting photo url (local identifier) from PHAsset and then accessing the image using PHCacheManager, but it slows down my scrolling and also shows lags while updating images in new cell. I was trying to use SDWebImage here by passing the url to the sd_setImageWithURL: method, however i found out that the URL is actually a local identifier which is not