Ive tried multiple online tools to resize my screenshots for the 4.7-inch and 5.5-inch formats at 1334 x 750 and 2208 x 1242 respectively. For some reason the largest I am able to get my screenshots is 1136 x 640? That is the original size of the screenshot I am using. Is there any way to modify the image and make them larger than the original to have them fit the appropriate settings?
Post not yet marked as solved
Im trying to update an SKShapeNode's frame after it's been added to the scene but it keeps saying that 'frame' is a get-only property.I want to make a simple health bar (rect) that changes size based on a health remaining variable.
Post not yet marked as solved
I'm attempting to find the best host player for all the players connected to the game and on SOME occasions the completion handler returns a host player to some players and returns nil to another player indicating no viable host was found (either all connections or very similar or error happened).I don't understand why some players are receiving different values for the host player? At the moment the method is being called by all players connected to the match, should this only be called by one player once matchmaking is completed and send the results to all players? It is happening about 15% of the time so would like to eliminate this error. The problem is that the application waits for the host to start the game so if one player fails to find the host and he is actually the host player to the other players the game never starts.
Lets say I have 3 Files/Classes:File A (Main View):File B (functions to Initialize Additional Views):File C (functions that update the data/labels in the views called from File B into File A):File A is the main view. I use a generic function from File B called "initHeader()" that initializes a "header view" and adds it to the view in File A. The reason the view is initialized from File B is because there is File A 1 to 50. I didnt want to copy paste the code to initialize the the new view in every version of File A.After the header is initialized, I will want to update some data in this view. How can I update the data in this view if1) there is no variable assigned to the new view in File A initialized from File B. I realize I could loop through all subviews in File A to see if a view matches the type of view initialized fomr File B, but I want to update it without having a pointer pointing to the new "header view" variable. Which brings me to2) What if I want to update the File B view that was added to File A through File C.In this case:->File A calls a function from File B to initialize the "header view"->I want the newly added "header view" to be update with different data (this method will be called from File C so I don't need to have the same function a million times in all the different sub File A files.If I were to do it all in just one file/class. I could easily do it:->var headerView = HeaderView()->headerView.updateAllVariables(fromDataObject: dataObject)BUT if I wanted to initialize the header view from approximately 50 different classes, I would need to copy and paste the same code to each class. Then if I want to change something it becomes a HUGE headache.How can I call all those from different files so I literally just write:->loadHeaderView (from File B)->updateHeaderView(fromData: dataObject) (from File C)Hope that makes sense! Do I make the functions in file B return the view after being initialized? Which would make it look something like:File A:var headerView = initializeHeaderView() <- From File BupdateView(headerView: headerView, fromData: dataObject) <- From File C