|
Is there a reason for using the user's Documents folder? Do you want the user to have access to the files through iTunes File Sharing? or can they add their own? If not I think just keeping the files in the application bundle should be fine. Anyone noticed UISliders acting poorly in iOS 8? If you tap on a slider that is at 100%: ---------0 it moves the handle to the left: -------0-- and keeps doing so until the handle is in the middle.
|
# ? Sep 24, 2014 16:09 |
|
|
# ? Jun 4, 2024 21:14 |
|
lord funk posted:Is there a reason for using the user's Documents folder? Do you want the user to have access to the files through iTunes File Sharing? or can they add their own? If not I think just keeping the files in the application bundle should be fine. Oh. I guess I'm confused. The user should NOT have access to these files at all. I guess I was thinking there was some sort of App Data folder which only the app itself had access to.
|
# ? Sep 24, 2014 17:04 |
|
HaB posted:Oh. I guess I'm confused. The user should NOT have access to these files at all. I guess I was thinking there was some sort of App Data folder which only the app itself had access to. That would be the "Library/Application Support" folder. Read more here.
|
# ? Sep 24, 2014 17:10 |
|
I had one stupid, nagging issue with auto layout still. I have a UILabel that I want rotated 90 degrees. I had all kinds of issues where auto layout would make the label do very odd things (go off screen, rotate back around, disappear entirely) when animating constraint changes to the parent view. I was chasing my tail by trying to compensate for all of these during the layout subview process. I finally got it mostly working, but it involved checking the major iOS version and changing the timing in seemingly arbitrary ways depending on the result. That is horrible and couldn't stick. In a moment of desperation, I removed the UILabel from my .xib and replaced it with a UIView placeholder in the correct, rotated dimensions. Manually putting the UILabel in there still doesn't work right all the time. Instead, now every time the label text is changed, I create a temporary UILabel, render it into a rotated CG context, yoink the CG context into a image, make a UIImageView, and smack that UIImageView into the center of my placeholder view. That was... fun. At least all of my weird layout problems regarding that label behaving differently across iOS versions now seem resolved. Remember, kids, auto layout does not play nicely with transforms.
|
# ? Sep 24, 2014 21:50 |
|
HaB posted:stuff Notifications can only use sounds in your app bundle so I hope you are prepared to ship all IAPs from the beginning, which it appears you are. There is no point in copying the files around, that's just a waste of space. Give them unique names and include them in your project. You can play them from there as well as use them for notifications. When you ask for bundle path to resource you're just getting a path into the filesystem... bundles are just directories.
|
# ? Sep 24, 2014 22:35 |
|
Who was it in this thread that was working for Facebook on iOS? I got an email out of the blue from them about a position and although I'm not actively looking for work, I'm a bit curious to say the least.
|
# ? Sep 25, 2014 03:21 |
|
status posted:Who was it in this thread that was working for Facebook on iOS? I got an email out of the blue from them about a position and although I'm not actively looking for work, I'm a bit curious to say the least. Is it me you're looking for? I'm ex-Facebook, sorta. Facebook has the best iOS developers outside of Apple, and the company is structured such that you can cast a wide net when you need the expertise (i.e. stuff that Stack Overflow wouldn't cover, ranging from intermediate to pretty darn advanced). It also enables you to be a Silicon Valley man-child, if you want, whose every need is taken care of*. This frees up you and your high salary to compete with your coworkers to see who can buy the best drone with the highest-quality camera and gimbal apparatus, which you will invariably fly around campus and post on your timeline (or on Instagram. Bonus points: Hyperlapse) for your Facebook friends to see, and your non-Facebook friends to be jealous of – you hope, because that drone didn't come cheap. * I jest, but it's really quite great. EDIT: You might also want to talk to Subjunctive, who's a true-blue Facebooker, or ultramiraculous, who recently joined EDIT 2: Also unrelated, but I missed this a couple of pages ago: Nipplebox posted:The documented convention is that, when passed nil, -isEqual: returns NO and -isEqualTo*: throws an exception, but this isn't consistent across all of Cocoa. Doctor w-rw-rw- fucked around with this message at 06:37 on Sep 25, 2014 |
# ? Sep 25, 2014 06:29 |
|
Doctor w-rw-rw- posted:It also enables you to be a Silicon Valley man-child Hey!!!!!!! Cool it with that poo poo
|
# ? Sep 25, 2014 08:21 |
|
What is wrong here:pre:In file included from /Volumes/raid/Development/IndexTranscriber/opencv-3.0.0-alpha/platforms/osx/opencv2.framework/Headers/core.hpp:1232: /Volumes/raid/Development/IndexTranscriber/opencv-3.0.0-alpha/platforms/osx/opencv2.framework/Headers/core/utility.hpp:461:10: error: expected member name or ';' after declaration specifiers bool check() const; ~~~~ ^
|
# ? Sep 25, 2014 19:35 |
|
So post initial iOS8 release it's time to clean up some cruft. Is there an easy way to share config settings, or plist settings between two targets in the same project? Basically our use case right now is that an extension needs to know certain bundle information about the containing app and vice versa, we also have different values for these based on the configured environment (debug/adhoc/stage..). The solution so far has been custom config fields in each target but ideally we would just load some common file in both targets, having to make sure a string is the correct value in multiple places is error prone. I'm guessing a project wide UserSetting is the answer?
|
# ? Sep 25, 2014 19:51 |
|
Kallikrates posted:So post initial iOS8 release it's time to clean up some cruft. I think you want .xcconfig files. You can extract common build settings into a single xcconfig then base each target's configuration from that xcconfig. I forget the details for configuring Xcode but that should give you something to look up. xcconfig files can include one another and interpolate other build settings, you can get a lot done with them.
|
# ? Sep 25, 2014 20:59 |
|
.xcconfig looks like it might be exactly what I want.
|
# ? Sep 25, 2014 21:16 |
|
status posted:Who was it in this thread that was working for Facebook on iOS? I got an email out of the blue from them about a position and although I'm not actively looking for work, I'm a bit curious to say the least. I used to manage iOS at FB (I do other stuff at FB now). PM me, I'm happy to chat.
|
# ? Sep 25, 2014 21:24 |
|
Have people started using Swift in their preexisting projects? I'm curious as to what the general sentiment is with using the language and bridging over the Obj-C (without having to rewrite it all) but then having two languages in the same project.
|
# ? Sep 25, 2014 21:41 |
|
So I just tried to enroll in the iOS developer program, but when I click the "Buy now" button I get redirected to the apple store updating page. No money has been withdrawn from my account, anyone seen this before?
|
# ? Sep 25, 2014 22:16 |
|
Doh004 posted:Have people started using Swift in their preexisting projects? I'm curious as to what the general sentiment is with using the language and bridging over the Obj-C (without having to rewrite it all) but then having two languages in the same project. I haven't. Although I bet it isn't that painful, I can't bother spending any energy dealing with bridging the two languages between files. Like I could make one new view area with Swift, but if it needed to communicate / pull information from existing Obj-C areas there would be those moments where I'd have to stop and think. And god knows stopping and thinking has never been on my agenda.
|
# ? Sep 25, 2014 23:27 |
|
Doh004 posted:Have people started using Swift in their preexisting projects? I'm curious as to what the general sentiment is with using the language and bridging over the Obj-C (without having to rewrite it all) but then having two languages in the same project. Our iPhone app has swift in production right now if anyone has questions. I wrote our extension all in it and some of the signaling code back and forth to the main app. Getting unit tests to work with a mishmash of swift and objc was complicated and I had to fall back to a really hacky way to do it. Seems apple wants your swift to be compiled into a module you can use from obj-c, but I just use it raw from my obj-c and vice versa and this caused issues with generated bridging headers.
|
# ? Sep 26, 2014 01:39 |
|
We're trying to get Xcode working in a computer lab with non-admin users. We have a script that elevates permissions for Xcode projects / simulator to run, but it does not work for playgrounds. Does anyone know where I might look for where playgrounds need their elevated permissions?
|
# ? Sep 26, 2014 16:37 |
|
So who wants to tell me how Hangouts and Messenger are managing their keyboards? They're using interactive dismiss so you can drag down to hide the keyboard, but the text entry view moves with it. We were able to mostly replicate this by adding an empty inputAccessoryView to our textfield, and observing its superview's frame changes so we could match the movement of the textfield with the keyboard. This doesn't work on iOS8. The observation of the superview does absolutely nothing, so when the keyboard comes up, our text entry view stays put, and when we drag to dismiss, it doesn't move either. I'm able to find the keyboard view through other means, but KVO still isn't giving me anything. Also, how the gently caress are they doing interactive setting of first responder? When the keyboard is hidden, I can pan up from the textfield and the keyboard slides up as I do. I have no idea how they did this without some sort of private fuckery. It's hurting my brain.
|
# ? Sep 26, 2014 17:00 |
|
status posted:They're using interactive dismiss so you can drag down to hide the keyboard, but the text entry view moves with it. We were able to mostly replicate this by adding an empty inputAccessoryView to our textfield, and observing its superview's frame changes so we could match the movement of the textfield with the keyboard. This doesn't work on iOS8. The observation of the superview does absolutely nothing, so when the keyboard comes up, our text entry view stays put, and when we drag to dismiss, it doesn't move either. I'm able to find the keyboard view through other means, but KVO still isn't giving me anything. We don't use drag down to hide, but we do follow the keyboard's animation when resizing our messaging window. It's a little complicated: Objective-C code:
|
# ? Sep 26, 2014 18:20 |
|
Yeah we were doing something similar before to have it move in time with the automatic animation via the notifications, but now that we're doing interactive dismiss, it's not working out. iOS8 broke it all and made me sad
|
# ? Sep 26, 2014 18:38 |
|
lord funk posted:We're trying to get Xcode working in a computer lab with non-admin users. We have a script that elevates permissions for Xcode projects / simulator to run, but it does not work for playgrounds. Does anyone know where I might look for where playgrounds need their elevated permissions? Are you running DevToolsSecurity -enable and then making the users who need to run Xcode members of the local _developer group? Playgrounds and the Swift REPL both use LLDB extensively, and you can't debug a process without being a member of _developer.
|
# ? Sep 26, 2014 20:39 |
|
eschaton posted:Are you running DevToolsSecurity -enable and then making the users who need to run Xcode members of the local _developer group? Playgrounds and the Swift REPL both use LLDB extensively, and you can't debug a process without being a member of _developer. Yeah, and this does get them through Xcode project building. But Playgrounds still complain. I'll try and get the exact wording next time I'm in the lab.
|
# ? Sep 26, 2014 22:32 |
|
iOS question: I have a table view being populated based on the results of an HTTP GET. I'm using dataTaskWithURL(NSURL, completionHandler) and in my completion handler I'm refreshing data on the table view.code:
|
# ? Sep 27, 2014 06:24 |
|
Make your view calls on the main thread.
|
# ? Sep 27, 2014 06:33 |
|
Yeah, use dispatch_async() to call reloadData on the main queue. You don't need the setNeedsDisplay call.
|
# ? Sep 27, 2014 06:39 |
|
Hell yeah! Thanks guys. Finally feeling like I'm getting a little momentum in iOS development.
|
# ? Sep 27, 2014 06:51 |
|
Has anyone heard or seen anything about Xcode 6 failing with incremental builds? Maybe of large C++ projects. Someone at work is convinced that it's unusable if you edit a header 'bad things happen.' And other teams have been on it since day of GM seed without seeing anything odd.
|
# ? Sep 27, 2014 14:09 |
|
Hughlander posted:Has anyone heard or seen anything about Xcode 6 failing with incremental builds? Maybe of large C++ projects. Someone at work is convinced that it's unusable if you edit a header 'bad things happen.' And other teams have been on it since day of GM seed without seeing anything odd. I have noticed weird behavior with projects that include built dependencies, and swift. Doing fuxcode, and clean builds way more often now.
|
# ? Sep 27, 2014 16:34 |
|
fleshweasel posted:iOS question: I have a table view being populated based on the results of an HTTP GET. I'm using dataTaskWithURL(NSURL, completionHandler) and in my completion handler I'm refreshing data on the table view. Unrelated to your question but double check you aren't creating a retain cycle in that completion handler. Also prefer tableView:cellForRowAtIndexPath: over dequeueReusableCellWithIdentifier: the former will remove the need to nil check since it will always return a cell
|
# ? Sep 27, 2014 16:39 |
|
Kallikrates posted:clean builds way more often now. I am doing clean builds nearly every time I change more than one file at a time.
|
# ? Sep 27, 2014 16:52 |
|
iOS 8 is just dragging me down. Every nook and cranny of my app is twisted and mangled from the iOS 7 version.
|
# ? Sep 27, 2014 16:56 |
|
Kallikrates posted:Also prefer tableView:cellForRowAtIndexPath: over dequeueReusableCellWithIdentifier: the former will remove the need to nil check since it will always return a cell The former is a UITableViewDataSource method, the latter is a UITableView method.
|
# ? Sep 27, 2014 17:44 |
|
I was under the impression that dequeueReusableCellWithIdentifier:forIndexPath: no longer returned nil, and the checking for nil was just old, leftover practices?
|
# ? Sep 27, 2014 18:52 |
|
If that's true then how do you specify which built-in style of cell to use? Or are people really building their own cell types for every single table view?
|
# ? Sep 27, 2014 19:34 |
|
Doh004 posted:I was under the impression that dequeueReusableCellWithIdentifier:forIndexPath: no longer returned nil, and the checking for nil was just old, leftover practices? Doc Block posted:If that's true then how do you specify which built-in style of cell to use? Or are people really building their own cell types for every single table view? Sure, why not? It makes it easier to bind cells logically (in terms of their functionality) to the view controller (presumably where the meat of the behavioral code lives), instead of bloating said view controller with a lot of gesture recognizers or accesses to random owned views to modify state. (Or in other words, encapsulation) Doctor w-rw-rw- fucked around with this message at 19:43 on Sep 27, 2014 |
# ? Sep 27, 2014 19:38 |
|
What does inheriting from UITableViewDataSource empower you to do? Do you still have to implement UITableView to get anything done?
|
# ? Sep 27, 2014 19:46 |
|
Doctor w-rw-rw- posted:Yep. Isn't that pretty standard by now? My thing is, what if you don't need any of that stuff? Just a table view of text and maybe some images that does something when you tap on a row? Why would I waste time recreating one of the standard table view cell styles for that?
|
# ? Sep 27, 2014 20:18 |
|
fleshweasel posted:What does inheriting from UITableViewDataSource empower you to do? Do you still have to implement UITableView to get anything done? UITableViewDataSource is a protocol that your table view's data source has to conform to, not a class you inherit from.
|
# ? Sep 27, 2014 20:20 |
|
|
# ? Jun 4, 2024 21:14 |
|
Doc Block posted:My thing is, what if you don't need any of that stuff? Just a table view of text and maybe some images that does something when you tap on a row? Why would I waste time recreating one of the standard table view cell styles for that? You don't have to if you don't want to! But it's neither hard not time consuming to subclass a UITableViewCell (hell, even put it within the same file as the VC ) and put whatever subviews you want in there.
|
# ? Sep 27, 2014 21:28 |