Posts

Swift playground how to stop the frame size becomes 1024*768

Solution:      When your viewController loads first ViewdidLoad() function will be called.That time your screen frame not yet to be updated. So you want to wait for the time that viewWillAppear() or ViewDidLayoutSubviews() functions called.That time you can check that size of your page. You don't want to wait for the function ViewdidAppear() will be called.

How to check iOS version in that device using Myapp iOS swift

Solution: Now a days apple had a method that will closure your viewcontroller or method that will execute based on the os version in the device.   @available ( iOS 10.0 , *) //you can code here @end or you can code like below              let dev = UIDevice.current.systemVersion.hashValue

iOS app is Ready for sale State in app store but not showing app in itunes store

Solution: If you uploaded the app and status is in ready for sale then it will take some time for showing the app in appstore.Because apple will update all the servers all over the world. It will take some time to show in itunes app store.So be patient to wait to show your app in the appstore. It will not be miss or duplicate.In previous times apple had taken more time for review and update.But now a days they had quick response with app store approval.So no issues.

How to add existing Frameworks in XCode iOS swift

Image
Solution: In your project Xcode select the project. Select your target.Then goto build phases tab   select link binary with libraries.Select the + button and add your framework to the project and use that.

Xcode product -> Archieve disabled when try to archieve

Solution: In your xcode near Run Button it had your target name and simulator selection option. If you want to archieve the project and upload it then you must have to select that "Generic ios device" option.Then only the archieve option will be enable. If you selected any simulator or your realtime device then archive option will be disabled. So must check that.

Codesign error: Provisioning profile cannot be found after deleting expired profile in my mac

Solution: If you deleted the profile in your mac then you will not be able to build your app in development and distribution. If you updated the certificate in development site then goto xcode -> Preference -> then select accounts In right side menu it had download manual certificates.Click that button and download the profiles. Goto xcode project and find the error and select the long string and find it in your project.Erase that line in your project and goto project and clean up the project. Goto target and select the newly downloaded profiles for your development and distribution and run.

how to enable button when all textfields filled in tableviewcell(SWIFT)

Solution: The below function is used to check the that all textfields are filled in a tableViewCell.You can pass the cell to the function it will return the boolean when one textfield is empty .Otherwise it will return true. func enableBtn(cell: UITableViewCell )-> Bool {         var isEnable: Bool = true         for textF in cell. subviews {             if textF. isKind (of: UITextField ) {                 let textFild = textF as ! UITextField                 if textFild. text == "" {                     isEnable = false                     return isEnable                 }             }         } ...