|
IIRC CoreLocation will take location data from a MiFi approved accessory, you just need to engage the right people. Let me know if that doesn’t work and I’ll see if I can track someone down.
|
# ? Jan 22, 2018 00:35 |
|
|
# ? May 22, 2024 13:15 |
|
I just updated to XCode 9.2 and I'm running into a lot of issues with the simulator that I'm pretty sure didn't occur in previous versions. I haven't narrowed things down to simple test cases yet but one thing I've noticed is that if I change the UI via a touch interaction ( automatically scrolling a scroll viewer, setting UIView.hidden, etc ) things seem to lag one update when running in the simulator but function just fine on real devices. I'm totally open to the problem being in my code but I'm curious if anyone else has seen weird performance using the new simulators. I'm also seeing a bunch of app crashes in the simulator that I can't reproduce on real devices.
|
# ? Jan 23, 2018 23:57 |
|
Shot in the dark but I’ve seen weirdness go away after deleting and recreating simulators.
|
# ? Jan 24, 2018 00:13 |
|
Do you mean deleting and readding via the 'Add Additional Simulators..' item at the end of the simulators list? I tried removing and adding one and it didn't fix the issue. Do I need to remove them all?
|
# ? Jan 24, 2018 01:07 |
|
Yeah that’s it. It’s definitely a "turn it off and on again" suggestion, not surprised it doesn’t work.
|
# ? Jan 24, 2018 04:15 |
|
fankey posted:I just updated to XCode 9.2 and I'm running into a lot of issues with the simulator that I'm pretty sure didn't occur in previous versions. I haven't narrowed things down to simple test cases yet but one thing I've noticed is that if I change the UI via a touch interaction ( automatically scrolling a scroll viewer, setting UIView.hidden, etc ) things seem to lag one update when running in the simulator but function just fine on real devices. I'm totally open to the problem being in my code but I'm curious if anyone else has seen weird performance using the new simulators. I'm also seeing a bunch of app crashes in the simulator that I can't reproduce on real devices. Do you have an Intel HD 3000 GPU or something similar?
|
# ? Jan 26, 2018 06:10 |
|
Anyone know of any way to create a lossy gif in Swift? kCGImagePropertyGIFDictionary doesn't seem to have many options. So far I've resorted to making the image smaller and skipping frames from my list of 31 images, which isn't exactly preferable.
|
# ? Jan 29, 2018 20:15 |
|
GIF is not a lossy file format. If you want a lossy encoding for what is essentially video then just use a video encoding.
|
# ? Jan 30, 2018 08:34 |
|
Oh really? Maybe the pallet limitations is all I’m looking for. Do you think I should go from a lossy compressed video format to gif to easily get a more reduced set of colors? Unfortunately my app uses a lot of colors since the filter fades images to different color hues. I wanted a gif option so people could easily share them on image upload sites like imgur. e: The video thing doesn't seem right. I don't know what I was thinking. Anyway I think I'll figure out how to reduce the color indices. LP0 ON FIRE fucked around with this message at 19:46 on Jan 31, 2018 |
# ? Jan 30, 2018 16:47 |
|
Simulated posted:Do you have an Intel HD 3000 GPU or something similar? As a matter of fact yes - MacBook Air Mid 2011.
|
# ? Jan 31, 2018 22:43 |
|
Here's the lossy compression property for gifs I was looking for: https://developer.apple.com/documentation/imageio/kcgimagedestinationlossycompressionquality Can't seem to make it make any noticeable visual or file size changes though. e: I guess while making the gif I’m just going to convert the source UIImage into a lower quality image format. I think that’s what you were getting at, I just thought there would be a more direct approach while composing a gif! LP0 ON FIRE fucked around with this message at 00:00 on Feb 1, 2018 |
# ? Jan 31, 2018 23:25 |
|
GIF pixel data is compressed losslessly. That option will not work. Your only options for GIF compression is to scale down or to decrease entropy (i.e. reduce palette) so that the LZW compression is more effective. Core Graphics doesn't offer you a way to do this easily, unfortunately, though there are utilities which do GIF optimizations - maybe check how they work. If mp4 is an option, it's still not ideal because as of a month ago, Imgur doesn't support mp4 uploads. Though it's possible through their desktop site using a private API...so maybe some reverse engineering would make that a possible, if unreliable, solution.
|
# ? Feb 1, 2018 00:32 |
|
I was able to manipulate each UIImage that was made into a gif by quantizing the pixel color data and converting back into a UIImage. I found this Stack Overflow and used almost all the code in the answer, aside from a rounding function that caps off at 255, and replaced the if statement that original checked for black and turned it to red. Quantizing the color made a huge noticeable difference in the file size, but it is very slow, memory intensive and power hungry. I made the max width 200px and it speeds things up quite a bit and makes the file size more realistic for image upload sites. I'm probably going to make it run as a background process instead, though that will probably sacrifice the speed a bit. My edited for loop: code:
code:
LP0 ON FIRE fucked around with this message at 21:39 on Feb 1, 2018 |
# ? Feb 1, 2018 21:34 |
|
edit: determined what I wanted to do wasn't possible
SaTaMaS fucked around with this message at 04:02 on Feb 4, 2018 |
# ? Feb 4, 2018 01:48 |
|
fankey posted:As a matter of fact yes - MacBook Air Mid 2011. It’s a GPU driver bug. The driver decides that sometimes you didn’t really need that update and drops it on the floor. I don’t have a workaround for you at the moment, other than using a metal-capable Mac or one with a newer Intel GPU.
|
# ? Feb 4, 2018 02:46 |
|
Can anyone get an autocompleted Swift initializer for things like UIView, CGRect, etc., the first time? Like, no pressing backspace, no arrowing through autocomplete menus? If you know a trick please let me know because
|
# ? Feb 5, 2018 02:20 |
|
Sometimes it helps to type a closing parenthesis then move back one and hit escape. Not often, but sometimes.
|
# ? Feb 5, 2018 03:24 |
|
I always do ‘Class.init(‘ and it autocompletes properly. Then just delete the ‘.init’ when I’m done.
|
# ? Feb 5, 2018 05:12 |
|
I have OK luck if I pause immediately after the (. If you so much as breathe at that point, you will never find the initializers.
|
# ? Feb 5, 2018 07:09 |
|
dc3k posted:I always do ‘Class.init(‘ and it autocompletes properly. Then just delete the ‘.init’ when I’m done. Okay so this is the kind of autocomplete I like (minus the deleting the '.init' part afterwards). You just keep typing arguments that are present in the rest of the function and it fills it in without waiting or arrowing through options. ManicJason posted:I have OK luck if I pause immediately after the (. If you so much as breathe at that point, you will never find the initializers. Yeah but you still have to arrow down through useless crap to find the one you want. Seriously considering changing my personal style guide to include '.init' just to type normally.
|
# ? Feb 5, 2018 14:57 |
|
I checked this thread because I'm starting to dive into ARKit but I haven't seen a whole lot of chatter about it. Is there a separate thread for that kind of stuff?
|
# ? Feb 5, 2018 22:40 |
|
IAmKale posted:I checked this thread because I'm starting to dive into ARKit but I haven't seen a whole lot of chatter about it. Is there a separate thread for that kind of stuff? Nah you're in the right place. I'd love to hear updates from you about ARKit, as there's a multimedia guy down the hall that does AR stuff but using Oculus / Unity stuff.
|
# ? Feb 5, 2018 22:56 |
|
dc3k posted:I always do ‘Class.init(‘ and it autocompletes properly. Then just delete the ‘.init’ when I’m done. lol, I thought I was the only one who did this.
|
# ? Feb 6, 2018 03:58 |
|
lord funk posted:Nah you're in the right place. I'd love to hear updates from you about ARKit, as there's a multimedia guy down the hall that does AR stuff but using Oculus / Unity stuff. I'm curious, though, if this is an error with the book, or something I'm doing wrong. In the section titled A Swift Tour, it tells me I can create an empty dictionary with [:] when type information can be inferred. However, doing this in a Swift 4 playground yields an Empty collection literal requires an explicit type error. Is this style of dictionary initialization deprecated in Swift 4?
|
# ? Feb 6, 2018 17:09 |
|
IAmKale posted:when type information can be inferred. Type information can't be inferred in that case. All the compiler has to work with is var and the variable's name, nothing about the type. Now, if it was a function argument, or if you were assigning the dictionary literal to an already declared and initialized variable, it would work
|
# ? Feb 6, 2018 17:30 |
|
hackbunny posted:Type information can't be inferred in that case. All the compiler has to work with is var and the variable's name, nothing about the type. Now, if it was a function argument, or if you were assigning the dictionary literal to an already declared and initialized variable, it would work Thanks for the clarification!
|
# ? Feb 6, 2018 17:39 |
|
Yeah you'd wantcode:
|
# ? Feb 6, 2018 20:17 |
|
Or!code:
Doh004 fucked around with this message at 22:38 on Feb 6, 2018 |
# ? Feb 6, 2018 22:35 |
|
oooooooorcode:
|
# ? Feb 6, 2018 23:09 |
|
Why is it so difficult to convince people that Xcode crashes need to be reported to Apple and not us?
|
# ? Feb 6, 2018 23:26 |
|
Who is us
|
# ? Feb 7, 2018 00:28 |
|
Plorkyeran posted:Why is it so difficult to convince people that Xcode crashes need to be reported to Apple and not us? Why would people be reporting Xcode crashes to you in the first place? Do you produce some sort of “Xcode plug-in?” If so, then crashes should be reported to you, as plug-ins aren’t supported by Apple and are quite likely to have a variety of blatant or subtle problems resulting from using reverse-engineered internals that can change literally between individual builds.
|
# ? Feb 7, 2018 00:48 |
|
I think he means this thread
|
# ? Feb 7, 2018 01:06 |
|
No. We have a library and people like to tell us about how Xcode crashed while they were debugging something using our library and expect us to do something about this.
|
# ? Feb 7, 2018 01:07 |
|
Plorkyeran posted:No. We have a library and people like to tell us about how Xcode crashed while they were debugging something using our library and expect us to do something about this. Yeah, that’s entirely on the IDE and debugger to deal with.
|
# ? Feb 7, 2018 04:30 |
|
Why is Xcode messing up indentation when I try to write out a switch statement? (Apologies for the slow, low-quality gif, I have no idea what a good MP4 hosting site is for screen recordings like this) Edit: I guess it's just a Thing with Xcode that you suckers have been living with all this time. And now I'm a sucker, too, because Swift is actually kind of fun IAmKale fucked around with this message at 06:30 on Feb 7, 2018 |
# ? Feb 7, 2018 06:15 |
|
IAmKale posted:Why is Xcode messing up indentation when I try to write out a switch statement? It's apparently a convention to have switch and case on the same indent level. Eclipse does it too.
|
# ? Feb 7, 2018 06:36 |
|
IAmKale posted:Why is Xcode messing up indentation when I try to write out a switch statement? That’s the convention for switch/case formatting. Also, for something like this you can make a raw-representable enum rather than create functions to convert between your type and strings.
|
# ? Feb 7, 2018 07:16 |
|
eschaton posted:That’s the convention for switch/case formatting. Aha, you're absolutely right, that's way less boilerplate for getting back a string value for a particular enum: code:
I feel as though I know enough Swift to at least get started dabbling with ARKit, though. And I can always peruse the rest of this (massive!) reference book later, or whenever I get stuck, whichever comes first Thanks for the tips so far. I know I'll be back with more as I dive into ARKit, SceneKit, and SpriteKit for the first time, but I'm feeling optimistic!
|
# ? Feb 7, 2018 07:39 |
|
|
# ? May 22, 2024 13:15 |
|
lord funk posted:oooooooor Brings me back to my C# days . We initially did that syntax when we started our app back in 2015 before standardizing things. I still find remnants in helpers that we were too lazy to update. IAmKale posted:Aha, you're absolutely right, that's way less boilerplate for getting back a string value for a particular enum: You can still use self, really just comes with your code style guide. That said, we don't use it because it highlights when we need to use capture lists in closures: https://stackoverflow.com/questions/39465726/capture-list-in-swift Doc Block posted:I think he means this thread I love the Facebook vs Apple fights ITT. Doh004 fucked around with this message at 12:59 on Feb 7, 2018 |
# ? Feb 7, 2018 12:55 |