|
Is there something collectionview does that stackview and a scrollview does not? (I know a lot of people can't target iOS 9 as a minimum yet, but still.)
|
# ? Mar 16, 2017 01:32 |
|
|
# ? Jun 8, 2024 11:19 |
|
Reuse.
|
# ? Mar 16, 2017 01:48 |
|
I mean, UICollectionViewFlowLayout handles like 95% of the work for me most of the time so... UICollectionViews 4 lyfe
|
# ? Mar 16, 2017 04:16 |
|
So I'm starting to play around with watch apps, and I'm wondering how I should be achieving the typical workflow of "make a network call to fetch some data, then show it in a table." I'm making the network call and getting the data just fine, but updating the table is kinda proving impossible. I can't update the number of rows in the table in my callback--I get an EXC_BAD_ACCESS, and I'm pretty sure I'm dispatching back to the main thread when my network stuff is done with. Anything obviously wrong stand out about this?
|
# ? Mar 16, 2017 04:48 |
|
fleshweasel posted:Is there something collectionview does that stackview and a scrollview does not? (I know a lot of people can't target iOS 9 as a minimum yet, but still.) Rich animated transitions and reuse with complex custom layouts, queriable for visible items. Doctor w-rw-rw- fucked around with this message at 04:56 on Mar 16, 2017 |
# ? Mar 16, 2017 04:54 |
|
fleshweasel posted:So I'm starting to play around with watch apps, and I'm wondering how I should be achieving the typical workflow of "make a network call to fetch some data, then show it in a table." I'm making the network call and getting the data just fine, but updating the table is kinda proving impossible. I can't update the number of rows in the table in my callback--I get an EXC_BAD_ACCESS, and I'm pretty sure I'm dispatching back to the main thread when my network stuff is done with. Anything obviously wrong stand out about this? EXC_BAD_ACCESS is all you get? No stack trace? Are exception breakpoints on?
|
# ? Mar 16, 2017 06:00 |
|
I got to the bottom of it. It's because my table row class was descending from WKInterfaceController instead of NSObject. The bottom of my stack trace was WKInterfaceController. edit: Sorry if I'm flooding the forum with dumb questions, but the next thing I'm wondering about is how to share user preferences between the watch and phone. It looks like App Groups doesn't suffice for this any more and you need to actually use the Watch Connectivity framework to have the watch request information from the phone. Should I have my watch app always ask the phone to make network requests for it? Should I be trying to use some kind of preferences synchronization so the watch can do its little task when the phone's out of range? It seems like users will almost always have their phones on and available with their watch. brap fucked around with this message at 06:50 on Mar 16, 2017 |
# ? Mar 16, 2017 06:36 |
|
fleshweasel posted:It seems like users will almost always have their phones on and available with their watch. I regularly step away from my phones at my desk with my watch still on. Pay attention to the corner cases sooner and they'll be smaller when they come back to bite you later.
|
# ? Mar 16, 2017 09:50 |
|
My boss is hoping to not have to buy me the company's first Mac by using a VM... is this going to work for simple app development or will I have to convince him to at least buy the higher end Mac mini I have a feeling it's at best going to be painfully slow
|
# ? Mar 16, 2017 09:53 |
|
funny Star Wars parody posted:My boss is hoping to not have to buy me the company's first Mac by using a VM... is this going to work for simple app development or will I have to convince him to at least buy the higher end Mac mini Also, you'll be required to hack the hypervisor in ways that at the least break licensing terms, possibly the law, to allow a macOS guest, and even if you do that, good luck finding install media. Chances are you're going to have to pirate that. If opening the company up to possible liability is worth a couple hundred dollars...that's troubling. To actually deploy Apple stuff, Xcode will need you to log in with your Apple ID, so there's a straightforward way for Apple – at least in theory – to identify you and figure out you're doing something wrong. Also, the higher-end mac mini is still not necessarily the best machine for the value. They were last refreshed in 2014. The lowest-end macbook pro (Late 2016) will be beat the best mac mini. by a lot. $1500 vs $1000. But maybe that can wait if you need to do iOS just to prove it's worth further investment.
|
# ? Mar 16, 2017 10:14 |
|
funny Star Wars parody posted:My boss is hoping to not have to buy me the company's first Mac by using a VM... is this going to work for simple app development or will I have to convince him to at least buy the higher end Mac mini Your company is trying to get around spending a modest amount of money on tools you need to do your job. You're also in violation of the EULA if you're running mac VMs on non-macs. Not sure what the ramifications for that are.
|
# ? Mar 16, 2017 12:41 |
|
That is kind of what I thought. Are the lower end iMacs going to work better than the $1499 MBP?
|
# ? Mar 16, 2017 14:53 |
I'd buy secondhand a lot sooner than I'd try hacking a VM.
|
|
# ? Mar 16, 2017 14:54 |
|
I showed my boss these posts and he's currently ordering me a 15" MBP, so i guess that works out pretty good. thanks everyone!
|
# ? Mar 16, 2017 15:18 |
|
Any suggestions on how to track down why after updating to XCode 8.2.1, the IDE completely locks up with 99% CPU usage 10 seconds every time loading my project? This is a standard ObjC project without any Swift, CocoaPods, etc. I don't see anything interesting the the Console logs. Edit: It finally came back after 45 minutes. I think one of the issues is that I'm checking out a sparse git checkout and XCode thinks there are 10,000s of missing files which it feels necessary to report to me, even though none of these file are referenced in the Workspace. Is it possible to work with sparse checkouts in XCode or am I going to be frustrated? fankey fucked around with this message at 23:35 on Mar 17, 2017 |
# ? Mar 17, 2017 22:19 |
|
fankey posted:Any suggestions on how to track down why after updating to XCode 8.2.1, the IDE completely locks up with 99% CPU usage 10 seconds every time loading my project? This is a standard ObjC project without any Swift, CocoaPods, etc. I don't see anything interesting the the Console logs. Unfortunately I don't know the state of sparse checkout support. That certainly sounds like something worth reporting, however. I'll file a bug right now but I'd suggest you do so as well so you can request status etc.
|
# ? Mar 18, 2017 19:11 |
|
leper khan posted:
This. I mean I know from experience that this doesn't always work out ideally, but one-time equipment/tooling should be an easy ask when the alternative is days/weeks of loving around. funny Star Wars parody posted:I showed my boss these posts and he's currently ordering me a 15" MBP, so i guess that works out pretty good. thanks everyone!
|
# ? Mar 19, 2017 12:39 |
|
I have a tableview of cells, and I would like the first cell to be highlighted when the view loads. What's the easiest/best way to do this in Swift? Edit: Found it! uncle blog fucked around with this message at 09:46 on Mar 20, 2017 |
# ? Mar 20, 2017 08:55 |
|
Anyone know when Xcode 8.3 is landing? Some coworkers will need it soon.
|
# ? Mar 20, 2017 19:23 |
|
edit: Adding .withRenderingMode(.alwaysOriginal) fixed the below. It was rendering the entire image as a template, thus tinting away the letters. I may have noticed if the background color for my image did not match the tint color. What on Earth am I missing here with UIBarButtonItem? I am rendering an image with UIGraphicsGetImageFromCurrentImageContext of text drawn on a circle. If I make a UIBarButtonItem with that image: Swift code:
If I instead set the UIBarButtonItem's custom view to a UIImageView with that same image: Swift code:
Sure, I can make this work, but what ridiculous Mondayism am I committing here? This code is all main thread. I have even tried displaying the same image used to make the empty blue circle in another view, and the letters are there. ManicJason fucked around with this message at 21:25 on Mar 20, 2017 |
# ? Mar 20, 2017 21:11 |
|
I tried with one of my barbuttons and it worked as expectedcode:
Vesi fucked around with this message at 01:03 on Mar 21, 2017 |
# ? Mar 20, 2017 23:18 |
|
Missed a good chance there to use defer.
|
# ? Mar 20, 2017 23:47 |
|
I swear, this used to work fine, but now displayNameForKey:value: is just giving me back nil. I'm trying to get the currency symbol for a currency code in a locale.code:
|
# ? Mar 22, 2017 02:27 |
|
lol wtf en_CA does it right but en_AU doesn't. localization loving sucks
|
# ? Mar 22, 2017 02:51 |
|
Is there a way to loop through the icons in an asset folder? I want to generate cells in a collection view for each icon in a specific folder. Items which all have different names. I used to cheese this by naming the icons 0 - [number of icons].
|
# ? Mar 22, 2017 13:34 |
|
1) Put the images in a folder instead of an Asset catalog Pro: easy Con: you lose out on the benefits of using Asset catalogs 2) Write a Script run phase which outputs a list of the image names into a text file Pro: Asset catalog Con: Eventually doesn't scale, gives your project more moving parts 3) Prefix your images, Foobar_1,Foobar_2,...,Foobar_10, and so on Pro: Predictable Con: Still have to keep track of the maximum number 4) Name the files what they are and make an array of their names in code Pro: If you have a weird off by one error or something you won't be staring at a bunch of numbers utterly confused Con: Name collisions for similar objects I prefer #4 mainly because I'm a fan of naming things what they are, especially data, and implementing some things regarding presentation or specific app behavior (like ordering) in code. Imagine copying the assets to a similar, but different app. The ordering might become totally irrelevant even if the images were useful. #1 is easy, #3 is even easier, and #4 is a little bit of overhead and boilerplate.
|
# ? Mar 22, 2017 14:06 |
|
Doctor w-rw-rw- posted:3) Prefix your images, Foobar_1,Foobar_2,...,Foobar_10, and so on Is there an easy way to create a space (where the background is visible) between cells in a tableView? Saw a suggestion for switching to sections instead of rows, but that creates a heap of issues as I use their row number elsewhere.
|
# ? Mar 22, 2017 15:15 |
|
Doctor w-rw-rw- posted:Anyone know when Xcode 8.3 is landing? Some coworkers will need it soon. Little bird is telling me very soon. More evidence today's release looks very much like GM. We are prepping our app icon changing releases.
|
# ? Mar 22, 2017 15:35 |
Branding / app strategy question. Suppose one has an app which is tailored to a city-specific service (let's say, for example, a catalog of parks in New York). Suppose that you then make another version of the app for parks in San Francisco. And another for Chicago, London, etc. The technically most elegant solution of course is to just have one app that does all the cities, and anyone can use it by customizing it for the city they're in. But from a branding standpoint it can be better to have "New York" or "Chicago" in the name/description of the app, so it's more specifically useful and more discoverable. I know this is a time-honored approach used by a lot of app authors, but it also smacks of stupid SEO tricks. Does Apple frown on there being a million different apps all tailored to different cities? Or is that still cool with them?
|
|
# ? Mar 22, 2017 15:43 |
|
uncle blog posted:Is there an easy way to create a space (where the background is visible) between cells in a tableView? Saw a suggestion for switching to sections instead of rows, but that creates a heap of issues as I use their row number elsewhere. Make your UITableViewCell's background color clear and add empty views as "spacers". Quick and dirty. Or if you want to be a cool kid and Do It Right, use a UICollectionView and use its built in item spacing.
|
# ? Mar 22, 2017 15:51 |
|
Data Graham posted:The technically most elegant solution of course is to just have one app that does all the cities, and anyone can use it by customizing it for the city they're in. But from a branding standpoint it can be better to have "New York" or "Chicago" in the name/description of the app, so it's more specifically useful and more discoverable. I know this is a time-honored approach used by a lot of app authors, but it also smacks of stupid SEO tricks. I hope that isn't a problem because that's basically what my company does (white labels apps for health care providers / fitness centers).
|
# ? Mar 22, 2017 15:53 |
|
Doh004 posted:Or if you want to be a cool kid and Do It Right, use a UICollectionView and use its built in item spacing. liberate tutemet ex inferis Nah just make your cells transparent, with a height equal to cell + spacer. Then add subviews for your content.
|
# ? Mar 22, 2017 15:54 |
Doh004 posted:Make your UITableViewCell's background color clear and add empty views as "spacers". Quick and dirty. What I did was this, except instead of "spacers" I made a secondary view inside the Content View to be the actual content view and hold all the content. Everything outside it is clear and the background shows through.
|
|
# ? Mar 22, 2017 15:55 |
|
lord funk posted:liberate tutemet ex inferis Love me some UICollectionViews. We're best buds.
|
# ? Mar 22, 2017 15:57 |
|
Cross-posting my adventures with UIDynamics from the Post your glitches thread. The idea for a dumb easter egg: https://zippy.gfycat.com/EasygoingJubilantBeaver.webm What happens when you put the avatar in a container view without changing any code: https://zippy.gfycat.com/EnchantedIncompatibleArabianhorse.webm My favorite was an early lesson not to mix UIDynamics with translatesAutoresizingMaskIntoConstraints: https://zippy.gfycat.com/InfamousNewBeauceron.webm
|
# ? Mar 23, 2017 01:07 |
|
Is it possible to apply for a WWDC ticket and give the ticket to someone who isn't named on the account? Basically my company's account has one of our business person's name on it but if we are lucky enough to get in we would obviously like one of our developers to go to the conference.
|
# ? Mar 27, 2017 20:05 |
|
Usually if you have the ability to do that your company has the contact info for someone at apple to facilitate that.
|
# ? Mar 27, 2017 20:58 |
|
Unless they decide to crack down on it this year for some reason, showing up with a badge with someone else's name on it is not at all a problem. Apple doesn't really have a reason to care beyond wanting to avoid having people reselling them.
|
# ? Mar 27, 2017 21:57 |
|
Ugh bitcode. Xcode 8.3 has made it grow from 16 MB to 70 MB for us.
|
# ? Mar 28, 2017 18:19 |
|
|
# ? Jun 8, 2024 11:19 |
|
How is go to definition/show documentation (alt+click) so INSANELY fragile for Swift in Xcode? The time I need to see a doc for a method is when I haven't provided a valid argument to it yet! Apple's dev tools are so staggeringly, staggeringly bad in comparison to almost any other vendor's.
|
# ? Mar 28, 2017 18:20 |