Posts

Showing posts from July, 2019

Move the images or files from one folder to document directory iOS swift

Solution: The below solution is used for move the entire folder data to the document directory. You can move the entire folder data except text files from that folder is like below.     // #MARK: - move the zip folder files to document directory          func movefilestoDocument(folderPath: String ){         let documentsPath = URL(fileURLWithPath: NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true )[ 0 ])         let path = URL(fileURLWithPath: folderPath)                  do {             // Get the directory contents urls (including subfolders urls)             let directoryContents = try FileManager.default.contentsOfDirectory(at: path, includingPropertiesForKeys: nil )             print(directoryContents) ...

Vetically align text to top iOS swift

Solution: It was not possible to align the text in center.But you can set the text to be center in the label. You can also set the text to be in horizondally center in the label. You can use the sizetofit and nooflines to set the label height with adjustable for lines also.

Button click not working iOS swift

Solution: I had the cell that contains one view with some set of elements and one button.I had added an action for the button.But if o click the button it was not working. After that i had checked that in storyboard the button is in the below of the view so it was not worked.So i get the button to front in the view and click that it was worked.....

iOS upload app issue

Solution: When i try to upload my app in app store not able to upload it shows an error that no bundle identifier found. So i tried that if that account has the permission from the admin for that app.So you have to check that itunesconnect website to get the app is listed in the account.

Swift 5 conversion in iOS xcode project

Image
Solution: In your Xcode if you open the project in warning tab you can see the below status But if you tried with that way it will convert your project to swift 5 but it will show more unresolvable errors. So better you can create a new project and add the old project files in step by step and resolve the syntax issues will be the best solution for this.If you can do this way you can save more time on migration.