Posts

Post not yet marked as solved
0 Replies
473 Views
Hello, I have a question about something mentioned in the Human Interface Guidelines in the section on image size and resolution ( https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/ ). It says to use an 8x8 pixel grid when creating images. What does it mean by this exactly - to ensure that the width and height of the image are multiples of 8, or to ensure that all image details have a size of at least 8x8? What kind of image could I create to see the effect of not doing it right? (I have placeholder artwork in my app, which is not 8x8 in either sense, and I don't notice it looking any different on different resolution iOS simulators. The placeholder artwork isn't meant to be very good anyway though).
Posted Last updated
.
Post marked as solved
7 Replies
3.7k Views
Hello,In the simulator (iOS 12.2, multiple phone versions tried), I had some code which presented one view on top of another, usingpresent(childVC, animated: false, completion: nil)where childVC is the view controller for the new view. Even though this view had had its windowframe set to the same frame as the window that contained the original view, the new view appeared smaller (in the upper left corner of the screen) with the old view taking up the rest of the space behind it. I couldn't figure out the cause of this, so I worked around it by setting the rootViewController of the window of the application delegate to the new view, which worked fine, except that when going back to the original view (dismissing childVC) and presenting another new view on top of it, I would get the message "Presenting view controllers on detached view controllers is discouraged".Now working on iOS 13.1, this workaround does not work. It results in a blank screen, after the view pops up briefly; viewWillDisappear is getting called for some reason. If I take out the part setting rootViewController of the window to childVC, then it works fine.I will note that these errors affect only the first view controller presented (after the original view controller that was originally the rootViewController of the window). If I move on to another view by pressing one of the buttons in my new view (in the case of the black screen, this can be done by setting a break point before the screen goes black and clicking on one of the buttons before continuing), then everything works as expected.I am looking for some insight into these errors; any help appreciated.
Posted Last updated
.
Post not yet marked as solved
2 Replies
461 Views
Hello all,I am relatively new to iOS programming (been doing it about a month). I am developing an app (game) for which I need to display a countdown timer. I have used the Timer class, creating a timer that repeats every 1.0 second in my viewDidAppear method of my view controller. When it fires, the selector decrements an Int representing time left and updates the label that shows time with the value of that Int. It also calls setNeedsDisplay on the label. There is really not anything else going on in this view yet other than that, but for some reason the countdown is very jerky; sometimes it even skips seconds.I have read that the Timer is not exact, but I wouldn't expect noticeable differences in firing times 1 second apart. The fact that sometimes seconds are skipped also indicates that sometimes the view is not updated when the timer fires. I have also read that setNeedsDisplay is the most appropriate way to get drawing done as soon as possible. It seems to be happening unacceptably slowly. I have just been working on the simulator for now; is this just a problem with running on the simulator, or am I not using the right classes/methods, or what?Thanks for your time.
Posted Last updated
.
Post not yet marked as solved
8 Replies
2.8k Views
In what circumstances does iOS require a user to authenticate with their Apple ID prior to making in in-app purchase?For context, this is my scenario:My app will offer consumable in-app purchases to a currently logged in user. The quantity of the purchase will be associated with their username and stored on a server I will be running. The username may be associated with multiple devices, and multiple usernames may be associated with the same device.From searching the forums, I have been led to believe that there is no way to find the Apple ID for the App Store that is currently signed in on a device; otherwise I would just require each unique user to use their own Apple ID. The crux of the question is: will I be safe in assuming that any user who makes an in-app purchase on a particular device had the authority to use the Apple ID with which the purchase was made?Thanks for your time.
Posted Last updated
.
Post marked as solved
1 Replies
759 Views
Hello,I am new to iOS development, and I am building an app for iPhone. I want to support as many different versions of the iPhone as possible.In the latest version of Xcode (or at least what I think is the latest version), there are simulators for iPhone XS Max, XS, XR, X, SE, 8 Plus, 8, 7 Plus, 7, 6S Plus, 6S, 6 Plus, 6, and 5S. On the other hand, in interface builder, there is the ability to view as device XS Max, XS, XR, SE, 8 Plus, 8, or 4S (7 & 7 Plus, as well as 6 <whatever> are missing; there is also a 4S instead of 5S - not sure if this is just a typo in Xcode, as 4S iPhones are no longer updateable, or if there is some reason they have included the ability to build interfaces for 4S but not 5S).A couple questions:Why do some of the devices that have simulators not have views in interface builder - are they redudant? If my app looks good in all the device views and runs correctly on all the simulators, which actual devices can I be reasonably certain it will work on?Thanks for your time.
Posted Last updated
.