|
edit: disregard (The first time I tried signing up, the listserv never sent me a confirmation email. This time it did)
|
# ¿ Oct 30, 2016 01:09 |
|
|
# ¿ May 14, 2024 20:36 |
|
Your question sounds like an XY problem: http://meta.stackexchange.com/a/66378 It's not necessarily a good idea to couple whatever custom view you're writing closely to the behavior of your ViewController. What are you really trying to do? If you're sure you need that though, have the view controller set a weak property on the view to itself.
|
# ¿ Jan 18, 2017 10:09 |
|
IMO unit testing UI is generally way more effort than payoff. Unit test core logic. Integration test the UI.
|
# ¿ Jan 24, 2017 08:11 |
|
fleshweasel posted:It seems like something went wrong if you can't import a compiled module written in swift 2 from swift 3. I'm sure there's something I don't know, but goddamn. Incompatible ABI. Conscious decision, not something unintentional.
|
# ¿ Feb 9, 2017 13:00 |
|
Thanks for open-sourcing swift-stdlib-tool!
|
# ¿ Mar 22, 2017 02:49 |
|
Worth adding that, IIRC, background queues get to run before dispatch_main() is called, but the main thread does not, until libdispatch is entered via dispatch_main, CFRunLoopRun, or {UI,NS}ApplicationMain. I think the pure libdispatch method is to use dispatch_main() and atexit() for cleanup, and call exit() with your exit code (correct me if I'm wrong). Depending on your script, you can also make things a little nicer if you like by using dispatch sources to respond to signals, accept stdin input, or track file updates, and other cool stuff. You can make it so that cancelling a dispatch source triggers said call to exit(). An empty while loop can easily consume tons of unnecessary CPU cycles, so if it fits the use-case, you can have a pretty low overhead process by using the loop functions that already exist.
|
# ¿ Apr 10, 2017 10:14 |
|
Is there an elegant abstraction for me to wrap lines of code to check errors in debug mode that will be compiled out zero cost in release mode? Specifically I'm using a rather stateful API with a geterror function that returns an error code, and I want to wrap every call to that API with something that will check for and log errors in debug mode, but get compiled out. I currently have something like this: Swift code:
|
# ¿ Jun 3, 2017 22:08 |
|
Why is it so hard to turn an array of strings into a char** in Swift? :/
|
# ¿ Jun 7, 2017 00:34 |
|
|
# ¿ May 14, 2024 20:36 |
|
*crosses fingers* I hope he goes to Facebook.
|
# ¿ Jun 22, 2017 08:23 |