|
Ender.uNF posted:Anyone ever have experience being contacted by foreign publishers or advertisers? I read Japanese and live/work in Japan, if you want to send me a PM.
|
# ? Mar 2, 2013 00:15 |
|
|
# ? Jun 1, 2024 06:19 |
|
Has anybody ever had to deal with debugging UIGestureRecognizer crashing once in a blue moon? From what I can tell in the Crashlytics logs, it queues up something to be acted upon in the next loop iteration and then on either _UIGestureRecognizerUpdate or -[UIDelayedAction timerFired:] it gives me an unrecognized selector or a EXC_BAD_ACCESS. I'm suspecting that the controller or the object that is sent the message is garbage collected because they user changed controllers, but it's impossible to tell in what specific transition this happened from the stack trace as it's all in the UIKit/CF libraries. Going to have to yell at my partner for having put a gesture recognizer on every loving controller in the app.
|
# ? Mar 2, 2013 20:15 |
|
Random guess: the recognizer's delegate gets deallocated, the recognizer sticks around, some other random object is allocated, the dangling pointer receives UIGestureRecognizerDelegate messages it doesn't respond to.
|
# ? Mar 2, 2013 21:19 |
|
pokeyman posted:Random guess: the recognizer's delegate gets deallocated, the recognizer sticks around, some other random object is allocated, the dangling pointer receives UIGestureRecognizerDelegate messages it doesn't respond to. That's what I'm thinking too. Whenever I'm swapping around controllers and I forget to remove gesture recognizers I always run into that issue.
|
# ? Mar 3, 2013 16:07 |
|
k Googling has been zero help here. How the hell do I add another UIBarButtonItem to a Button bar? I tried dragging one onto the xib, apparently that only works if you're using storyboards (I'm not - tho it did let me make the connection to the IBAction). I have the following code in viewDidLoad, but the button is not visible when the app runs. So uh...wtf? code:
Thanks in advance.
|
# ? Mar 3, 2013 18:21 |
|
HaB posted:k Googling has been zero help here. I believe this is the right way: code:
If you've just plopped a navigation bar into your xib, then you'll need to access that bar directly. If you're still having trouble, you'll have to show us how you setup the relationship between your controller and the navigation controller. Also, you should use some logging/debugging to make sure the navigationItem is not nil at the time you're accessing it.
|
# ? Mar 3, 2013 18:43 |
|
HaB posted:How the hell do I add another UIBarButtonItem to a Button bar? I tried dragging one onto the xib, apparently that only works if you're using storyboards (I'm not - tho it did let me make the connection to the IBAction). I have the following code in viewDidLoad, but the button is not visible when the app runs. So uh...wtf? If you're targeting iOS 5 upwards I think you can add the button to the rightBarButtonItems array. If you need to support older versions, I think the method I've used is to subclass UIBarButtonItem and add multiple buttons to it, then set that to the rightBarButtonItem property. Edit: Everything above applies too, this is specifically to allow you to add multiple buttons on one side of the navigation bar.
|
# ? Mar 3, 2013 18:45 |
|
Sorry I missed if you were trying to add a second right side button, or just add THE right side button?
|
# ? Mar 3, 2013 19:38 |
|
Hog Obituary posted:I believe this is the right way: Yeah, I just dropped a toolbar on the Xib. Only relationship I set up was connecting the existing ButtonItem to the IBAction I wanted it to call. That one works. It's on the bottom as well - are they supposed to be on the top? I don't think a tab bar controller is apropos since the buttons are only popping modal views (one to send SMS via MFMessagteComposeViewController, and the non-working one to show the Contact Picker.)
|
# ? Mar 3, 2013 20:17 |
|
You need to create your own outlet for the toolbar then. The navigationItem/navigationController properties are only connected for viewControllers managed by a UINavigationController. To add buttons in code, make an array containing all the UIBarButtonItems you're adding, then call (I forget the exact method name) [myToolbar setItems:myItemsArray animated:YESorNO];
|
# ? Mar 3, 2013 21:42 |
|
HaB posted:k Googling has been zero help here. Make the button, do UIBarButtonItem initWithCustomView and set the button as the custom view. Then do self.navigationController.navigationItem setRightBarButton: in your view controller's viewWillAppear or viewDidLoad.
|
# ? Mar 3, 2013 22:24 |
|
gooby on rails posted:If this is for an IAP store, it's not exposed like that, you're expected to retrieve the price in local currency from the SKProduct and the currency symbol from the locale.
|
# ? Mar 4, 2013 11:19 |
|
I only just noticed the control events UIControlEventEditingDidBegin, UIControlEventEditingChanged, and UIControlEventEditingDidEnd. I guess I assumed that the delegate was the only way.
|
# ? Mar 5, 2013 02:06 |
|
Protip: your push notification certificates expire each year
|
# ? Mar 5, 2013 02:44 |
|
I have an application whose root view controller is a UITabBarController. There are three tabs and each is a UITableView that pulls in a different JSON feed. I'm using Core Data to store the feeds so that the application works offline. The problem is that when you first run the app, the data doesn't populate the table views in the 2nd and 3rd tabs. The first tab populates just fine on its own because I'm using lazy instantiation to load up the first feed when the database is set. However, when either the second or third tab is selected, those tables are empty. The user can populate those tables by hitting the refresh button, but I'd rather it happen automatically when the user selects those tabs. I tried putting my refresh code into both of the UITableViewControllers' viewDidLoad method, but the refresh code isn't running from there. If I put the refresh code in viewWillAppear, it populates when each tab is selected as you'd expect, but it calls the refresh method every time the tab is selected - which I'd like to avoid because it's trying to hit the JSON feed and is repopulating the table each time. Is there a way to cause the tables to populate once when the tabs are selected (as is happening with just the first tab) and then, for future uses, the user can just click refresh to get the latest data?
|
# ? Mar 5, 2013 07:34 |
|
Set a flag or better yet a timestamp when you refresh in viewWillAppear?
|
# ? Mar 5, 2013 07:39 |
|
ManicJason posted:Set a flag or better yet a timestamp when you refresh in viewWillAppear? Thanks. This actually sounds like a decent option and should be relatively easy to implement.
|
# ? Mar 5, 2013 07:53 |
|
Lurker checking in. We didn't write a single line of C, but we just released an app written in AS3 and compiled through Flash CS6. Anyone else using that workflow? If anyone has questions about that, I'd be happy to answer what I can. Generally I'm really glad we chose to go that way.
|
# ? Mar 5, 2013 08:04 |
|
j4on posted:Lurker checking in. We didn't write a single line of C, but we just released an app written in AS3 and compiled through Flash CS6. Anyone else using that workflow? If anyone has questions about that, I'd be happy to answer what I can. Generally I'm really glad we chose to go that way.
|
# ? Mar 5, 2013 09:37 |
|
Small White Dragon posted:Did you also release it for Android or any other platforms? Not yet, but we plan to within the next month. The app should cross compile to Android and Blackberry (but we're not going to do a blackberry, unless you guys think it's worth it) We just need to buy a few test devices and figure out how the Play store works with regards to.. well, everything. This was our first app and we did it under a tight deadline so we haven't even looked at the Play store yet in regards to contracts, device testing, etc. It seems like it will be pretty straightforward though; I only used one iOS native extension for the silent switch.
|
# ? Mar 5, 2013 09:45 |
|
Okay, fantastic day. First we get kottke'd, then Apple emails us and asks for art assets for a "potential upcoming promotional opportunity on the App Store." I'm guessing/hoping this means possible App of the Week or Editor's Choice. Wow. Here's the question: should we go on sale if we are featured? We're currently a $2 app at our highest ranking ever: #7 Kids, #65 Games, #109 Overall on iPad, #8, #102, #205 on iPhone. I've read some advice that this is the perfect time to go half price and try to climb to the top-- should we do it?
|
# ? Mar 5, 2013 23:17 |
|
j4on posted:Okay, fantastic day. First we get kottke'd, then Apple emails us and asks for art assets for a "potential upcoming promotional opportunity on the App Store." I'm guessing/hoping this means possible App of the Week or Editor's Choice. Wow. My experience with getting featured was on the Google Play store, but from my anecdotal experience we made a ton more sales dropping down to $0.99 than keeping it at our original price ($2.99) while we were featured. It seemed to really grab the impulse buyers, and we hade a huge increase in total revenue made after going on sale.
|
# ? Mar 6, 2013 00:58 |
|
Congrats, dude. Go for it!
|
# ? Mar 6, 2013 02:14 |
|
Doc Block posted:Congrats, dude. Go for it! Thanks! After convincing the other team members that I'm not crazy, I think we're going to go for it. Assuming, of course, that the featuring actually happens. Here's a couple of interesting links that support that idea if other people are interested: http://www.slideshare.net/pinchmedia/iphone-appstore-secrets-pinch-media (though it's from 2009) http://www.distimo.com/publications (a few of these reports, though they are generally pretty badly written)
|
# ? Mar 6, 2013 03:13 |
|
What's the closest thing to Turtle Graphics or something on the Mac? Looking for something interactive that I can draw to a window with, preferably in Python or Ruby. Is there a Ruby graphics gem I can use? I want to be able to do something like: CreateWindow 500,500 PlotPixel 10, 10 Circle 50, 50, 25 Line 100, 150 etc
|
# ? Mar 6, 2013 14:17 |
|
Bob Morales posted:What's the closest thing to Turtle Graphics or something on the Mac? Looking for something interactive that I can draw to a window with, preferably in Python or Ruby. Is there a Ruby graphics gem I can use? I'm assuming you mean Logo the language. There looks to be a few OSX versions. Here's one that even has a turtle: http://www.alancsmith.co.uk/logo/
|
# ? Mar 6, 2013 14:44 |
|
Hell yeah, Logo. In 3rd grade I stayed after school for a week so I could draw AC / DC then make the screen colors flip out. It was awesome.
|
# ? Mar 6, 2013 17:10 |
|
After fiddling with xCode for a few hours I've decided to just come and pray one of you have some advice to help me out. I've decided to write a 2d game for practice using Cocos2d with Box2d. Well I kept getting weird compiler errors (weird as in they'd go away if I removed a file hierarchy then reimported them and it would be gone until the next time everything got indexed again.), but I got fed up with that and just went on to set up unit testing (and getting Storyboards working too). Well after I got some unit tests set up (And storyboards with the Cocos2d Director semi-working), that same compiler error came back every time I added a new file to that hierarchy and I said "gently caress it", I'm not going to add/remove that poo poo each time. So I found Kobold2D and that does workspace and import "magic" to fix a lot of the other problems I was having, while making some new ones: Unit testing decides to not want to recognize files that exist in the project. I get a few "Symbols not found", which I resolve with adding user/search headers to the target, but then it goes and asks about Cocos2d ones and even after adding those to the header search path, still gives me the errors. The "best" part is that I could create source code for the tests to completion without it throwing errors, but as soon as I hit "Test", it gives file not found errors. So here I am, several hours later with a template project that compiles (atleast) but not much else to show for. Anyone have any ideas to remedy the problem? Alternate Unit Testing, some other search paths to try, anything? I'm pretty discouraged to continue after all this, since one of the main things I wanted to learn was good unit testing, but I'm not happy about spending more time doing nothing but loving around with trying to get xcode to see things.
|
# ? Mar 7, 2013 02:22 |
|
Did you create your project using the Cocos2D templates? Knowing the compiler error would help. Also, I'd advise using Chipmunk instead of Box2D. It's faster and the API is less of a hassle IMHO.
|
# ? Mar 7, 2013 02:59 |
|
Doc Block posted:Did you create your project using the Cocos2D templates? The Cocos2D ones were caused by what I assume to be some files not having a .mm file extension, or Prefix.pch being "used oddly". Since I moved over to Kobold2D, it has it's own project maker that will put your newly made project into it's workspace and automatically creates a target for iOS and OSX. Originally I had used Cocos2D templates and they worked, aside from the random error that seemed to be coming from files not having the Objective-C++ ending. Compiler errors for Kobold2D are/were: code:
and finally: code:
As for Chipmunk vs Box2D, I'm not going to implement physics stuff for at-least a week or two, so I'll check them out when I get closer. I've only gone with Box2D since C++ was just a mental pick (although having to gently caress around with Objective-C++ is what caused some errors I didn't mention with the Prefix.pch). I doubt I'll need to do anything fancy in either version; I just need to have squares and circles bumping occasionally. For now I'm just going to get some of the non-Cocos2d stuff done (Multi-dimensional Arrays and Perlin/Simplex noise) so I can maybe regain some hope that my project will get somewhere past the "xCode being xCode" stage. dereekb fucked around with this message at 03:19 on Mar 7, 2013 |
# ? Mar 7, 2013 03:14 |
|
What version of Cocos2D are you using? The templates not creating Objective-C++ files with a .mm extension seems really weird. Or were you using one of the non-physics templates and then adding Box2D yourself?
|
# ? Mar 7, 2013 03:27 |
|
After an app I was working on made a mess of having no fewer than 20 dependencies (RestKit brought in a couple of those so maybe those don't count), I switched to Cocoapods to try it out for managing the dependency and versioning mess. It turns the libraries into a static library, bundle resources, and header files which it integrates into your project by generating an xcworkspace for you. I can't imagine running without it now - try it out. It also generates a plist and markdown file with library acknowledgments so you can just display the output of that in the area of the app that lists libraries used with copyright terms.
|
# ? Mar 7, 2013 03:32 |
|
Doc Block posted:What version of Cocos2D are you using? The templates not creating Objective-C++ files with a .mm extension seems really weird. Kobold2D is using the latest version of Cocos2D. http://www.kobold2d.com/display/KKSITE/Home To simplify my timeline of problems: - Started with Cocos2d and it's templates. Template compiled without a problem, but once I started adding new classes and files things started behaving poorly. - Unit testing with Cocos2D worked, but the file errors made me give up on that. ...Hours later... - Switched to Kobold2D because it gave a decent amount of benefits. - Templates also compiled without a problem, and no problems after I added my classes. Things looking great, I can start working... - Unit Testing doesn't work... ugh. - Said gently caress it and started working on non-Cocos2d/Kobold2d stuff So the Cocos2D templates created the .mm's fine, but every time I created a new class, it would give a bunch (~20) more errors about the Box2d files not seeing something correctly. "Fixed" by removing and re-adding a folder, but that got old... Doctor w-rw-rw- posted:After an app I was working on made a mess of having no fewer than 20 dependencies (RestKit brought in a couple of those so maybe those don't count), I switched to Cocoapods to try it out for managing the dependency and versioning mess. It turns the libraries into a static library, bundle resources, and header files which it integrates into your project by generating an xcworkspace for you. I can't imagine running without it now - try it out. Awesome, I haven't heard of that. I've done some of that stuff by hand on other projects that, and did actually try to fix the Cocos2D mess by putting it in it's own static library and including it, but I got the same Box2D errors (that I think still got fixed by adding/removing those folders...). dereekb fucked around with this message at 03:48 on Mar 7, 2013 |
# ? Mar 7, 2013 03:43 |
|
Well, here's what might be going on with the off-and-on errors, especially if they're due to file extensions. tl;dr: you're not consistently including all the headers you're using, so if the PCH file is unavailable for some reason, your build will fail. PCH files are specified as being included before the compiler reads anything out of the main source file. Everything in the PCH file is "visible": it doesn't matter whether or not you actually #included a particular header anywhere in the translation unit as long as it's in the PCH. So it's pretty easy to write code that doesn't compile if and only if the PCH file is available. One reason why a PCH file might not be available is because it hasn't been built yet. That can cause transitory errors to show up while it's being built, if e.g. you put some of your own project headers in the PCH and then edit them. I'm not going to claim that this is some great situation that's clearly not at all our fault — especially the fact that we tell you about these transitory errors — but I will point out that these errors won't happen if you're actually careful about including the files you use. But the more important reason that a PCH file might not be available is because it actually does exist but happens to not apply under the current compiler settings. Xcode is normally set up to only build one PCH file per project. Some compiler settings don't matter at all for how we process code: you'll get the same PCH file no matter what warning flags you use (obligatory exception: -Wwrite-strings, which changes the type of string literals). But compiler settings like the language mode can cause a huge number of changes in headers, so if the PCH file was built in ObjC++ mode and you try to use it in a C or ObjC or plain C++ file, the compiler will just silently ignore it. If your code was implicitly relying on declarations from the PCH, voilà, your code won't compile. So it's generally good for compile time to avoid using too many different options on different files, but the real fix is to make sure you aren't implicitly relying on the PCH file being used.
|
# ? Mar 7, 2013 04:44 |
|
rjmccall posted:Well, here's what might be going on with the off-and-on errors, especially if they're due to file extensions. tl;dr: you're not consistently including all the headers you're using, so if the PCH file is unavailable for some reason, your build will fail. The PCH file included the cocos2d.h, foundation, and a few other things that I might have just taken for granted Prefix.pch would have included. The first time I messed up is when I added Box2D.h to the #ifndef _OBJC_ by accident and it gave me errors (which I don't particularly remember) about that, but after I changed that, it ended up looking like: code:
When I get a chance I'll probably try again and get Cocos2D with Chipmunk and ARC enabled to work and forgo reliance on the PHC and see how things go. vvvvv Haha, well I wasn't putting all my headers like CCNode.h in the PCH, just Cocos2d.h which includes the imports for all the header files. I guess that's kind of considered the same thing since the PCH contains all those headers by proxy of Cocos2d though... dereekb fucked around with this message at 19:21 on Mar 7, 2013 |
# ? Mar 7, 2013 06:11 |
|
Yeah, if you aren't going to be using it in most/all of your implementation files, don't put it in the PCH.
|
# ? Mar 7, 2013 06:40 |
|
Anyone have any recommendations for services for a team to share large art assets?
|
# ? Mar 7, 2013 10:43 |
|
This site is goddamned fantastic. Over 3k indexed blog posts and articles: http://osx.hyperjeff.net/Reference/CocoaArticles quote:Articles about programming in Cocoa are many and in many places. The majority of them are of very high quality. To help out, I made this collected index, searchable by title or by article content. This page is very easy to maintain, so please email me any other articles out there that I've missed. Of course, make sure you also know about Apple's Cocoa docs! Also note that there are many Cocoa languages beyond Objective-C.
|
# ? Mar 8, 2013 18:48 |
|
That puts my OP to shame in a major way. So it's now the OP!
|
# ? Mar 9, 2013 09:19 |
|
|
# ? Jun 1, 2024 06:19 |
|
pokeyman posted:That puts my OP to shame in a major way. So it's now the OP! Still, I liked your OP Might be good to have a short paragraph still though, just for layouts sake.
|
# ? Mar 9, 2013 09:28 |