|
I think viewDidLoad is fine too, though you might be replacing the root view sometimes in which case loadView makes more sense because you've got to set the root there anyway If I've got to muck with layout after getting size information (adjusting constraint constants) I do it in viewDidLayoutSubviews, just be careful not to create a layout cycle.
|
# ¿ May 27, 2021 19:16 |
|
|
# ¿ May 22, 2024 10:37 |
|
One thing that made AutoLayout a lot better to me is layout anchors and Use Your Loaf has a really good post about them: https://useyourloaf.com/blog/pain-free-constraints-with-layout-anchors/ I haven't read through Apple's docs here in awhile but this is probably good too, though you may have already seen it: https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/index.html Anything specific causing you issues?
|
# ¿ May 28, 2021 15:24 |
|
I would fail hard at concurrency-related questions in an interview. I feel like I've been cheating by using ReactiveCocoa (pre-Swift) and RxSwift (and now Combine) for so long.
|
# ¿ Jun 1, 2021 15:36 |
|
uncle blog posted:Is there an overwhelming consensus for naming every viewcontroller "XxxViewController" instead of "XxxVC"? In my personal projects I do this and haven't run into issues. I pitched it to folks at work and they wanted `ViewController` so that's what we do there. uncle blog posted:Edit: I'm not sure - I think I've always had to remove and add it back. I'm pretty salty about the SPM+Xcode integration as a whole - I wish it were just a plain Swift file you could edit by hand (even if there were a graphical interface it should just generate/modify a swift file). Glimm fucked around with this message at 22:36 on Jun 1, 2021 |
# ¿ Jun 1, 2021 22:27 |
|
KidDynamite posted:kind of salty AsyncImage is SwiftUI only. I'll complain about that in 3 years when I can finally use it, in the meantime I'll complain about the fact that I need to support completely broken iOS 13 in SwiftUI for another year. Apple really needs the equivalent of Android's Jetpack.
|
# ¿ Jun 9, 2021 15:14 |
|
eschaton posted:My understanding is that Swift Concurrency relies on significant runtime support, which is only available in the new operating systems. Yep: https://forums.swift.org/t/will-swift-concurrency-deploy-back-to-older-oss/49370/4 quote:That said, everyone is aware of the value of it doing so, and is something that is being explored/considered. This bit is interesting though. I hope Apple starts taking this approach.
|
# ¿ Jun 10, 2021 15:18 |
|
eschaton posted:This probably seems weird to people who insist on doing things the hard way and using code for everything Fwiw I've spent a lot of time doing it both ways and laying out in code is easier over the long term imo. Now most of our new stuff is SwiftUI which is even easier but also still code.
|
# ¿ Jul 7, 2021 19:08 |
|
Does C23 adding '@' to its source character set have any impact on Objective-C in the future? Is it mainly a compatibility thing - ie, someone could name a function `@` which ObjC would have difficulty working with? https://twitter.com/__phantomderp/status/1494801823949103107
|
# ¿ Feb 19, 2022 19:44 |
|
Ah okay, thanks!
|
# ¿ Feb 20, 2022 05:21 |
|
Has anyone run into an issue where an ipa created in CI has proper entitlements (e.g., push notifications) - validated by unzipping the ipa and inspecting it - but after uploading to the AppStore (TestFlight) the entitlements are gone? We are moving from GitLab CI (and self-hosted runners) to Azure DevOps (MS runners) and for some reason, our builds in TestFlight no longer have push capability (or any entitlements). It's strange because we're able to download the ipa we create, unzip it, and can see the provisioning looks correct. We use this Azure Extension to do the upload: https://marketplace.visualstudio.com/items?itemName=ms-vsclient.app-store which looks like it uses Fastlane, maybe folks have seen this with Fastlane, too. Would this be worth a TSI? I've never really used it but I'm pretty lost on what to try next. Glimm fucked around with this message at 02:21 on Apr 1, 2022 |
# ¿ Mar 31, 2022 01:58 |
|
pokeyman posted:I'm feeling more sad about "looking forward to using this in a few years when I bump a min sdk requirement" than usual, which is maybe a sign that I'm more excited about what I've seen so far. 100% SwiftUI and related libraries need to be back ported and available via SPM. The bugs from version to version are hard to deal with, so many version checks in our app.
|
# ¿ Jun 10, 2022 20:53 |
|
Is there an easy way to tell if an xcframework relies on/uses HealthKit? We rely on a 3rd party to give us a binary SDK. They have a version that uses HealthKit and one that does not. They say they've provided us the version without HealthKit, but Apple is rejecting our application because we use HealthKit or CareKit, according to their analysis. I'm sure we (or the folks providing that SDK) are doing something that's causing HealthKit to be referenced, but I'm not sure how to test for it or validate the build beyond sending it to Apple and crossing my fingers.
|
# ¿ Nov 21, 2022 19:23 |
|
Plorkyeran posted:otool -L Foo.framework/Foo will list the libraries that a framework depends on. Thanks!
|
# ¿ Nov 22, 2022 04:10 |
|
Do the Swift/C++ interop updates change anything with C? Is it possible to make a C target in an SPM project depend on a Swift target? If not, would the best roundabout way of doing this be to "convert" the project to Objective-C (rename files to .m) and import Swift code that way? The long-term goal is to rewrite an old C project with ~190,000 LOC in Swift, replacing small bits as we go. The project is deployed on Linux.
|
# ¿ Jan 15, 2024 05:01 |
|
|
# ¿ May 22, 2024 10:37 |
|
I naively attempted to build the project with a C++ compiler and got a lot of build errors I'll look into that approach more - I was hoping ObjC would be a good idea since I have a lot more experience with it (C++ I haven't used since a single university course). Thanks! edit: Building with C++ wasn't too bad, now to integrate it with my Swift code using SPM Glimm fucked around with this message at 19:17 on Jan 15, 2024 |
# ¿ Jan 15, 2024 16:36 |