New Solutions

how to copy file from main bundle to Document Folder

I want to check one file in Document folder.I want if this file not exist in document folder copy it from main bundle to document folder. I write this code and this file to be copy but my problem here.....!!!! my file is .sqlite file (Database file) and when copy to document folder hasn't data in self!!!! why??? while the this file when is in main

it1352 11 2020-12-01

Swift universal framework depending on pod

I'm developing a small Swift framework that depends on Alamofire. I'm using it as an embedded framework of an app belonging to the same workspace and it works perfectly. The problem arises when I want to build an universal framework with an aggregate target. Then, when executing the script to generate the framework it fails with the message No su

it1352 4 2020-12-01

How to set each UICollectionView section in an individual column

I have a UICollectionView which contains a given amount of sections that each one of them consists of a given amount of rows. Now, since I assigned the grid layout as vertical, the UICollectionView looks something like this: However when the width of the screen enlarges such as on landscape mode or on an IPad, I would like the collectionView

it1352 1 2020-12-01

Showing beta versions of an app to a customer

Can I send to my customer a beta version of my iOS app that he can run in the Simulator ? Can I install Simulator only (without Xcode) on a Mac ? I actually need an efficient methodology to send him the beta versions of the app, without having to meet him at each update. Also, (3.) is there a way to install a beta version of the app, I develope

it1352 1 2020-12-01

SQLite on iOS - SQL to copy from one file to another

I have 2 database files in my iOS app: An original database (readonly, kept in my app's home directory) The user's database (kept in the user's Documents folder) I need to run a SQL query to copy from the original database to the user's, something like: INSERT INTO UserDatabase.MyTable SELECT * FROM OriginalDatabase.MyTable; Is this possibl

it1352 0 2020-12-01

Every new line add a numbered list UITextView

I'm trying to add a number to the beginning of each row whenever the user enters a newline. I'd like the numbers to go in order (like in an ordered list), but with my current code, if the user does not add a new line at the end but instead adds the line in the middle of the UITextView, it will continue counting from where it left off at the bottom

it1352 0 2020-12-01

iPhone - Call function from another view controller

I have a function called sendDataToMotor. It is in my First View Controller classes. I have another view controller called SecondViewController. I need to call this function from the Second View Controller.m class. I tried declaring the property: @property(nonatomic,assign)UIViewController* firstController; in my SecondViewController.h class. F

it1352 0 2020-12-01

SpriteKit - Making a sprite defy gravity (like a balloon)

Does anyone have any idea how I can make my SKSpriteNode defy gravity? I thought of inverting the default gravity but realise I also need things to fall too! It seems like it should be easy but reading through the documentation I can’t see how I would do it! Thanks Solution Update: In iOS 8 / OS X Yosemite (10.10), physics fields provide an eleg

it1352 2 2020-12-01

How do I pass in a void block to objc_setAssociatedObject in swift

I'm trying to add tap gesture support to UIView via an extension. This is pretty straight forward using Objective-C, but I'm getting the following error when trying to set the void return block on the runtime property. error: type '() -> Void' does not conform to protocol 'AnyObject' Here is the computed property: var tapAction: (() -> Vo

it1352 0 2020-12-01