|
code:
|
# ? Sep 27, 2014 21:32 |
|
|
# ? Jun 5, 2024 04:26 |
|
Doh004 posted: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 21:49 |
|
ManicJason posted:I thought the method with forIndexPath throws an exception if there is no table cell type registered, but the old dequeue method without specifying an index path returns nil if no cell type is registered. Objective-C code:
|
# ? Sep 27, 2014 21:54 |
|
It's not "hard" in the sense that it's no more difficult than creating any other custom view, but in my apps the standard table view cell styles have been perfectly adequate. Which brings me back to my question: if we aren't supposed to use the old methods that might return nil (the ones that don't require the use of a custom cell that you've already registered), how are we supposed to specify which of the built-in cell styles we want?
|
# ? Sep 27, 2014 21:58 |
|
I was pointing out that it still makes sense, depending on the method used. It's not like putting code into a viewDidUnload, something that is actually just a waste of lines.
|
# ? Sep 27, 2014 22:01 |
|
Doc Block posted:It's not "hard" in the sense that it's no more difficult than creating any other custom view, but in my apps the standard table view cell styles have been perfectly adequate. Subclass the UITableViewCell and in initWithStyle just pass in the style you want.
|
# ? Sep 28, 2014 15:33 |
|
Alright, I just created my first workspace and added a third party library in addition to my own project. Now whenever I run the unit test in my own project, it fails to build and the issue navigator shows no issues. If I just use cmnd+B to build it builds, but clicking the play button next to my test method fails to build. What's that about?
|
# ? Sep 28, 2014 22:02 |
|
Check the build log, and also fuxcode.
|
# ? Sep 28, 2014 22:17 |
|
I honestly can't figure what it was about. I have done the sloppy solution and included the 3rd party library directly into my project. Now I'm not seeing the issue any more. That probably needs to be redone properly so it lives in the project it originally came in. I went looking for the build log and I'm not really sure I opened it properly. Googling for it doesn't give a straightforward answer on how to even open it. I have another thing going on. I'm trying to pass data between two table view controllers, each one embedded in a navigation controller. I have a selection segue happening so touching an item in my first table view opens the second one. However, the destination view controller is my navigation view controller! I solved it with this code in the first view controller that I'm pretty sure is bad: code:
|
# ? Sep 29, 2014 03:00 |
|
How do you guys share code between projects? I've set up a separate repo with its own project that builds a shared framework, and I include that repo in my project using git subtree and Xcode workspaces. I'm not really sold on git subtree though -- either it's pretty buggy or I'm doing something stupid because I keep running into weird issues with conflicts and unmerged changes when there shouldn't be any, and I've had to totally trash and re-add the subtree a couple times now. I can't think of any good alternatives, though.
|
# ? Sep 29, 2014 05:33 |
|
Has something changed with CGAffineTransform in iOS 8? Things are jumping / snapping around in ways I totally wasn't expecting when I got up this morning. Like this: code:
code:
|
# ? Sep 29, 2014 17:34 |
|
There are some changes to default UIView animations. I don't think that's what you're running in to but I thought I'd mention it anyway. Session 236 has the details.
|
# ? Sep 29, 2014 17:41 |
|
If a view already has a non-identity transform I thought the way to apply an additional transform was to construct one with code:
|
# ? Sep 29, 2014 17:42 |
|
So apparently, the system calls section of the man pages on my Mac have decided to vanish:code:
|
# ? Sep 30, 2014 01:08 |
|
Eschaton might know a simple way to reinstall those pages, but if you have a Time Machine backup, you could do a quick restore of that stuff:code:
|
# ? Sep 30, 2014 01:53 |
|
Mikey-San posted:Eschaton might know a simple way to reinstall those pages, but if you have a Time Machine backup, you could do a quick restore of that stuff: Ah that's a good idea...though I haven't done a Time Machine back up in nearly 2 years, haha. My Mac isn't really my primary system anymore. And, who/what is Eschaton? Google points me to some blog or something?
|
# ? Sep 30, 2014 02:12 |
|
pliable posted:Ah that's a good idea...though I haven't done a Time Machine back up in nearly 2 years, haha. My Mac isn't really my primary system anymore. Eschaton is another goon, hi. I think those man pages are installed as part of the command-line tools, install the latest Xcode command line tools package and you might get them back.
|
# ? Sep 30, 2014 02:25 |
|
eschaton posted:Eschaton is another goon, hi. Hi there And yep, that worked perfectly! Thank you much! I'm still absolutely baffled as to how just that section of the man pages were erased but, eh...
|
# ? Sep 30, 2014 02:51 |
|
So I'm trying to get a grasp on pointers in Objective-C and I'm just getting entirely thrown off by passing an NSString as an argument.code:
I know this is a really dumb question but I've not dealt with pointers and all my background is in C#/python, so I'm actually trying to understand whats happening here. I've come across a ton of tutorials that basically cover this secnario: code:
Not sure if that makes sense and I may need to take a break, reset, and re-read, but maybe something rather simple if off in my understanding here.
|
# ? Sep 30, 2014 14:07 |
|
pokeyman posted:There are some changes to default UIView animations. I don't think that's what you're running in to but I thought I'd mention it anyway. Session 236 has the details. Will watch, thanks. Kallikrates posted:If a view already has a non-identity transform I thought the way to apply an additional transform was to construct one with Yes, sorry it was a typo. Should have read: code:
|
# ? Sep 30, 2014 16:01 |
|
Full code:code:
code:
|
# ? Sep 30, 2014 16:08 |
|
Walked posted:So I'm trying to get a grasp on pointers in Objective-C and I'm just getting entirely thrown off by passing an NSString as an argument. Someone else can surely give the formal explanation, but when it comes to obj-c pointers, I think the dereferencing is implied. If you're using a C/C++ object then you'll have to do the normal dereferencing (I think), as that example shows. The obj-c [s someNSStringMethod] is functionally the same as the C++ s->someStringMethod()
|
# ? Sep 30, 2014 16:16 |
|
Walked posted:So I'm trying to get a grasp on pointers in Objective-C and I'm just getting entirely thrown off by passing an NSString as an argument. Not sure if it's a typo, but you're missing the : in your method. code:
|
# ? Sep 30, 2014 16:16 |
|
Walked posted:So I'm trying to get a grasp on pointers in Objective-C and I'm just getting entirely thrown off by passing an NSString as an argument. How does this work C code:
|
# ? Sep 30, 2014 16:48 |
|
pokeyman posted:How does this work This is really helpful. I assume that the %@ in the NSLog is the same principle? Still wrapping my head around it but that example is exceedingly helpful. edit: And yes that was a typo to leave out the colon; transcription error between two computers
|
# ? Sep 30, 2014 16:55 |
|
Walked posted:This is really helpful. I assume that the %@ in the NSLog is the same principle? Still wrapping my head around it but that example is exceedingly helpful. Try implementing Objective-C code:
|
# ? Sep 30, 2014 17:05 |
|
pokeyman posted:There are some changes to default UIView animations. I don't think that's what you're running in to but I thought I'd mention it anyway. Session 236 has the details. I'm pretty sure after watching this that animations being 'additive' by default in iOS 8 is the culprit. But I don't see a way to disable that when I want to use UIView.animateWithDuration. It looks like you're forced to use it unless you make your animations with something like CABasicAnimation?
|
# ? Sep 30, 2014 17:54 |
|
Walked posted:So I'm trying to get a grasp on pointers in Objective-C and I'm just getting entirely thrown off by passing an NSString as an argument. Because the NSLog() call is taking a pointer to an NSString, not the NSString object itself, so you're just passing it the pointer that was passed in to your method. %@ means it wants a pointer to an Objective-C object, which it then calls -description on, and then prints what gets returned. And since NSString's -description method just returns the string, it prints the string. In Objective-C, you never access the objects directly, you just pass around pointers to them. So you never need to dereference a pointer to an Objective-C object. quote:I've come across a ton of tutorials that basically cover this secnario: In C/C++/Objective-C, a pointer is just a variable, and the value of the variable is understood to be a memory address. In Objective-C, since objects can only be allocated on the heap, you will only reference Objective-C objects via pointers. Because of this, people tend to refer to a pointer to an Objective-C object as the object itself, but it isn't. You only dereference a pointer when you want to access the thing at the memory address that the pointer points to. code:
But, again, for Objective-C objects, you never dereference pointers to them. All you do is pass around pointers to them, since every method or function that takes an Objective-C object is actually just taking a pointer to the object. Doc Block fucked around with this message at 21:48 on Sep 30, 2014 |
# ? Sep 30, 2014 21:43 |
|
Thank you guys. That pretty much got me sorted out; playing with some code to get it nailed down but I think I'm good to go with this. Thank you again.
|
# ? Sep 30, 2014 21:52 |
|
I don't remember--were Mavericks GM seeds upgradeable to the final release? Not that it's a guarantee for Yosemite, though I know it's been promised for the public beta.
|
# ? Oct 1, 2014 02:43 |
|
Installing the second GM seed (which became the final release) on top of the first GM seed was tricky, but upgrading GM1 -> 10.9.1 worked fine.
|
# ? Oct 1, 2014 03:47 |
|
Just wanna say that PaintCode is awesome. No more having to create a bunch of variations of the same toolbar icons and such. Gonna have to see about finding the best way to make it work with different image sizes due to different size classes and whatnot, but still. It's a vector drawing app, except it can export your drawings as Core Graphics draw calls in Objective-C, Swift, and C#, both for iOS and OS X.
|
# ? Oct 1, 2014 05:40 |
|
Doc Block posted:Just wanna say that PaintCode is awesome. No more having to create a bunch of variations of the same toolbar icons and such. Gonna have to see about finding the best way to make it work with different image sizes due to different size classes and whatnot, but still. You can set the matrix such that you can scale the coordinates to whatever size you wish. I did this (also tried PaintCode, it's pretty okay, but I preferred to rewrite it a little). I'll pull the code up later tonight - Excerpt: Objective-C code:
Doctor w-rw-rw- fucked around with this message at 06:11 on Oct 1, 2014 |
# ? Oct 1, 2014 05:47 |
|
I'm sure I'll figure it out, thanks though. PaintCode certainly isn't perfect, but good lord I am not going to miss having to create @1x @2x and now @3x images, and having to create them for different size classes.
|
# ? Oct 1, 2014 06:01 |
|
Oh yeah, when I say rewrite, I mean extracting things into constants, and using core graphics calls instead of UIBezierCurve. But that's just because I'm a neckbeard and like C APIs. Also, see above edit.
|
# ? Oct 1, 2014 06:11 |
|
Doctor w-rw-rw- posted:You can set the matrix such that you can scale the coordinates to whatever size you wish. I did this (also tried PaintCode, it's pretty okay, but I preferred to rewrite it a little). I'll pull the code up later tonight - I think screen scale is handled by the third parameter of UIGraphicsBeginImageContextWithOptions isn't it? Assuming main screen. Also you win a prize UIKit Function Reference posted:UIGraphicsGetImageFromCurrentImageContext edit: CocoaPods is so frustrating. Presumably for the people who work on it too. pokeyman fucked around with this message at 06:29 on Oct 1, 2014 |
# ? Oct 1, 2014 06:26 |
|
pokeyman posted:I think screen scale is handled by the third parameter of UIGraphicsBeginImageContextWithOptions isn't it? Assuming main screen. pokeyman posted:edit: CocoaPods is so frustrating. Presumably for the people who work on it too.
|
# ? Oct 1, 2014 06:33 |
|
Doctor w-rw-rw- posted:Agreed. My coworker is one of the CocoaPods devs. What about it is frustrating? I can pass it on. The implementation of it is crazy-making. I actually jumped in on development back in the day (lol), then thought about the whole thing and concluded "this makes no sense". Took me a couple years until the next time I (grudgingly) tried it out again. Now it's a huge pain trying to use it alongside Swift. I know they're working on it, but the implementation means that's a bigger project than it could've been. I long for a pseudo-fork of CocoaPods that does away with workspaces and static libraries and instead just downloads some code and wires it into your target(s). edit: Just remembered: this thread was what spurred me to these conclusions. Good ol' schwa.
|
# ? Oct 1, 2014 06:41 |
|
Doctor w-rw-rw- posted:Oh yeah, when I say rewrite, I mean extracting things into constants, and using core graphics calls instead of UIBezierCurve. But that's just because I'm a neckbeard and like C APIs. Also, see above edit. I don't know how long it's been since you used PaintCode, but now they have this thing they introduced in PaintCode 2 called StyleKit, where you can have drawing colors and such be split off so that you can change them for all your images at once. So it's like having that stuff broken out into constants, but also works in the PaintCode UI. (I'm not a big fan of modifying generated code).
|
# ? Oct 1, 2014 07:02 |
|
|
# ? Jun 5, 2024 04:26 |
|
Doc Block posted:I don't know how long it's been since you used PaintCode, but now they have this thing they introduced in PaintCode 2 called StyleKit, where you can have drawing colors and such be split off so that you can change them for all your images at once. So it's like having that stuff broken out into constants, but also works in the PaintCode UI. (I'm not a big fan of modifying generated code). pokeyman posted:I long for a pseudo-fork of CocoaPods that does away with workspaces and static libraries and instead just downloads some code and wires it into your target(s).
|
# ? Oct 1, 2014 07:35 |