Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
lord funk
Feb 16, 2004

Anode posted:

If you want an excuse to redo it, there is something you'd gain: ease of maintenance.

Don't tempt me! :ohdear:

You're right, of course. Plus moving forward it would be easier to add to it. By my god. It's going to be a week of un-gluing this thing.

Adbot
ADBOT LOVES YOU

Nybble
Jun 28, 2008

praise chuck, raise heck
I'm in the process of creating a company. My incorporation is almost complete, but there are a few more steps left. In the meantime while the lawyers are taking care of that, I would like to start doing some programming. Since eventually I will be signing up through the Apple Dev program as a company, and not an individual, should I just buy XCode now, and sign up later for the program? It seems like from Modig's experience, it can take some time anyway. (Also, I'm impatient)

Edit: My impatience took over. What's 5 bucks? Chump change, that's what. If anyone has any experience with signing up a company with the Developer program I'd love to hear about it. Ease of signing up, what all they required (like EID or other papers), etc. Thanks!

Nybble fucked around with this message at 21:27 on Apr 25, 2011

Mikey-San
Nov 3, 2005

I'm Edith Head!

modig posted:

As far as memory management goes, the guidelines seem to be that I should release any object I own. What does it mean for me to own it? I'm guessing that if I call the alloc function directly, I probably own it. Also I guess any @property with retain counts. What else counts as me owning it?

You need to read the memory management documentation.

Memory Management Programming Guide

(It's generally not a good idea to attempt to summarize or restate them, so I prefer linking to them.)

Yakattak
Dec 17, 2009

I am Grumpypuss
>:3

Nybble posted:

I'm in the process of creating a company. My incorporation is almost complete, but there are a few more steps left. In the meantime while the lawyers are taking care of that, I would like to start doing some programming. Since eventually I will be signing up through the Apple Dev program as a company, and not an individual, should I just buy XCode now, and sign up later for the program? It seems like from Modig's experience, it can take some time anyway. (Also, I'm impatient)

Edit: My impatience took over. What's 5 bucks? Chump change, that's what. If anyone has any experience with signing up a company with the Developer program I'd love to hear about it. Ease of signing up, what all they required (like EID or other papers), etc. Thanks!

Why not just use Xcode 3, oh wait too late.

modig
Aug 20, 2002

Nybble posted:

It seems like from Modig's experience, it can take some time anyway. (Also, I'm impatient)


I signed up on Thursday, my account was enabled sometime Sunday. Late enough that I didn't feel like figuring out how to provision my iPhone for actual testing, so I haven't done that yet.

Tux Racer
Dec 24, 2005

lord funk posted:

Don't tempt me! :ohdear:

You're right, of course. Plus moving forward it would be easier to add to it. By my god. It's going to be a week of un-gluing this thing.

Not only that, but NSSets are faster to reference than NSArrays.

fankey
Aug 31, 2001

Has anyone attempted to use the Live555 RTSP library within an iOS app? I've gotten it to build and link to my app but I'm not sure the best way to integrate the task management. I'm guessing the correct way is to subclass TaskScheduler with something that uses the iOS scheduler but the documentation is a little sparse ( to be polite ) so if someone else has already done this work it'd be handy to look at it.

Once I'm able to receive RTP video packets, if they are in a form that can be natively decoded by the iPad ( like .h264 ) is it as easy as passing the packets off to something like a MPMoviePlayerController or will I need to link to ffmpeg or something similar to do any video decoding from a stream?

lord funk
Feb 16, 2004

Tux Racer posted:

Not only that, but NSSets are faster to reference than NSArrays.

Is this true for individual objects, or just when you iterate over the whole group? So using member: is faster than objectAtIndex:?

ZombieApostate
Mar 13, 2011
Sorry, I didn't read your post.

I'm too busy replying to what I wish you said

:allears:
I've got an App idea I want to develop, but don't have access to a mac. I suppose my options are to use a third party SDK (Airplay or MoSync or <insert your better idea here>) or try to set up dual boot windows/hackintosh on my computer, hopefully without having to reformat and start from scratch. I know the OP says third party SDK's tend to make garbage apps, but that sounds like it would be a lot easier than possibly destroying my windows install. What would you guys recommend?

e: if you happen to know of a tutorial that starts with "I have a windows PC" and ends with "I can dual boot windows/mac and didn't reformat", that would be swell. There's a lot of tutorials out there that I think I could adjust, but having an existing one would make life easier.

ZombieApostate fucked around with this message at 20:33 on Apr 26, 2011

Tux Racer
Dec 24, 2005

lord funk posted:

Is this true for individual objects, or just when you iterate over the whole group? So using member: is faster than objectAtIndex:?

Well I am just getting my feet wet with iOS and Mac app development, but from what I have gathered, an NSSet is just a hash set, which means, yes this is true only for individual objects. That said, remember that since other data structures provided in the Foundations framework are just classes, so when you create an object of that class, let's say NSArray, you could actually have an NSSet of NSArrays. Also, the difference between NSArray and NSSet when finding an object is that with NSSet, you just ask the set using member: if that object exists within the set. That's an O(1) operation. With NSArray, searching for an object can either be O(n) or O(log n) depending on if you're using a sequential search or a binary search, respectively. So in this specific case, an NSSet is better than an NSArray. There are other instances where an NSArray is better than an NSSet. You'll figure out these situations through trial and error. There are trade-offs for both, so you have to make the design decision.


ZombieApostate posted:

I've got an App idea I want to develop, but don't have access to a mac. I suppose my options are to use a third party SDK (Airplay or MoSync or <insert your better idea here>) or try to set up dual boot windows/hackintosh on my computer, hopefully without having to reformat and start from scratch. I know the OP says third party SDK's tend to make garbage apps, but that sounds like it would be a lot easier than possibly destroying my windows install. What would you guys recommend?

e: if you happen to know of a tutorial that starts with "I have a windows PC" and ends with "I can dual boot windows/mac and didn't reformat", that would be swell. There's a lot of tutorials out there that I think I could adjust, but having an existing one would make life easier.

I have OSX running in a VM, and it was nearly painless to set up. There are plenty of tutorials floating around, and of course the hackintosh thread in SHSC.

wellwhoopdedooo
Nov 23, 2007

Pound Trooper!

Tux Racer posted:

Also, the difference between NSArray and NSSet when finding an object is that with NSSet, you just ask the set using member: if that object exists within the set. That's an O(1) operation.
I don't think that's possible.

Sewer Adventure
Aug 25, 2004

wellwhoopdedooo posted:

I don't think that's possible.

http://stackoverflow.com/questions/2703936/nsdictionary-nsarray-nsset-and-efficiency/2705313#2705313

wellwhoopdedooo
Nov 23, 2007

Pound Trooper!

Oh, average case, sure I'll buy that. But, correct me if I'm wrong, that fills a set and dictionary with

"1"
"2"
"3"
...
"99997"
"99998"
"99999"

which is more of a test of how good of a string hash function you have (and not a very good test at that) than how well your hash table does lookups--and that's fair for the stack overflow question, but not great for the question of how fast you can do lookups on any arbitrary hash--do they do so well for objects whose hash value is their memory address? Is using memory addresses as the hash value even common in Objective-C?

Anyway, I'll believe first part, for the average case anyway, but if member: is faster than objectAtIndex: for anything other than the most pathological of cases, naming it NSArray is downright deceptive.

ZombieApostate
Mar 13, 2011
Sorry, I didn't read your post.

I'm too busy replying to what I wish you said

:allears:

Tux Racer posted:

I have OSX running in a VM, and it was nearly painless to set up. There are plenty of tutorials floating around, and of course the hackintosh thread in SHSC.

A VM would be great to at least test the water and make sure it'd be worth the trouble of setting up a Mac environment to work in, but my processor doesn't support Hardware Virtualization and everything I've seen leads me to believe a Mac VM won't work without it :saddowns:

Tux Racer
Dec 24, 2005

ZombieApostate posted:

A VM would be great to at least test the water and make sure it'd be worth the trouble of setting up a Mac environment to work in, but my processor doesn't support Hardware Virtualization and everything I've seen leads me to believe a Mac VM won't work without it :saddowns:

Ah, well that would cause a problem. In that case, check the hackintosh thread. The OP has a lot of great resources, particularly the tonymacx86 blog. That said, if you have an AMD CPU, you're boned.


wellwhoopdedooo posted:

Oh, average case, sure I'll buy that. But, correct me if I'm wrong, that fills a set and dictionary with

"1"
"2"
"3"
...
"99997"
"99998"
"99999"

which is more of a test of how good of a string hash function you have (and not a very good test at that) than how well your hash table does lookups--and that's fair for the stack overflow question, but not great for the question of how fast you can do lookups on any arbitrary hash--do they do so well for objects whose hash value is their memory address? Is using memory addresses as the hash value even common in Objective-C?

Anyway, I'll believe first part, for the average case anyway, but if member: is faster than objectAtIndex: for anything other than the most pathological of cases, naming it NSArray is downright deceptive.

You're really splitting hairs here. As Apple is a good software company, I think we can rest assured that their hashing algorithm is fine. Furthermore, Apple has put in a layer of abstraction so that we don't need to know what is being hashed and how quickly the algorithm performs. Obsessing over the minutiae doesn't change how quickly hashing performs relative to other lookup methods.

Yes with smaller sets of data, doing a search on an array is quicker than doing a hash lookup, but once you get to larger sets, hashing is significantly faster than any search algorithm in the worst-case scenario. And yes, hashing is an O(1) operation. Any lookup on any set of data has the same, constant complexity.

Also, none of this changes the fact that using NSSet instead of NSArray would make his code more maintainable.

And to lord funk, ZombieApostate is right. NSSet is slower than using a search on an NSArray in instances involving smaller sets of data. If you want to do the math you can find out what that threshold is, but I am assuming your app doesn't need every ounce of processing power it can squeeze out of the CPU. If that's the case, NSSet will be a good choice for the aforementioned reasons. If you add more data to your sets, you will be able to sleep soundly knowing that your app will not slow down due to less efficient search algorithms.

EDIT: I just need to clarify, I am not talking about a hash lookup vs. something like objectAtIndex:1. I am talking about a situation where you're looking for an object, but you don't know where it is in the set/array or if it exists.

Tux Racer fucked around with this message at 00:26 on Apr 27, 2011

modig
Aug 20, 2002

OHIO posted:

Have you tried having the TV out open in the simulator before starting your app?

Now I've actually done this, and it seems to work so far. Thanks.

So now I need to assign a view to the second display. Should I create a new ViewController for the second display? Then if I want to have the second display respond to say a button press on the iPhone's ViewController, should I message the AppDelegate and have the AppDelegate message the second view controller? That seems sort of inefficient. Currently the window (iPhone) and secondWindow (TV) are properties of the AppDelegate. Maybe I should pass the secondWindow (or at least it's view property?) object to the primary ViewController?

chimz
Jul 27, 2005

Science isn't about why, it's about why not.
Check out this guy's post about the cool stuff NSArray does in the background to make things faster and you'll see why reasoning about NSArray and NSSet like they're just simple implementations of arrays and hash tables doesn't always hold true.

http://ridiculousfish.com/blog/archives/2005/12/23/array/

The rest of his blog also has a bunch of interesting discussions about how Cocoa works that are worth a read.

Tux Racer
Dec 24, 2005

chimz posted:

Check out this guy's post about the cool stuff NSArray does in the background to make things faster and you'll see why reasoning about NSArray and NSSet like they're just simple implementations of arrays and hash tables doesn't always hold true.

http://ridiculousfish.com/blog/archives/2005/12/23/array/

The rest of his blog also has a bunch of interesting discussions about how Cocoa works that are worth a read.

I guess I stand corrected. That's interesting, especially since I have read elsewhere that NSSet is advantageous to NSArray for the reasons I outlined above in a couple different places.

chimz
Jul 27, 2005

Science isn't about why, it's about why not.
NSSet is still probably better than NSArray for doing set type operations i.e. add/remove/contains without ordering. The different interface gives it more freedom to do optimizations in the background. You should use whatever interface most matches the operations you're trying to perform, and let it worry about how to do that most optimally.

edit: quote != edit

wellwhoopdedooo
Nov 23, 2007

Pound Trooper!
Well, never claiming to have any idea how this poo poo works again.

Anyway, I have a question: What's the right way to load a view from a NIB through code, and add it to a tabBarController? I've been just doing initWithNibName:, constructing an NSArray with that, and setting that array as the tabBarController.viewControllers, and all I get is a blank tab bar, and if I touch the center where the icon would be, it disappears. If I touch the tab bar anywhere else, it just does nothing.

I'm as sure as I know how to be that the view that I'm stuffing into the tabBar is loading--all the outlets do actually point to stuff, .tabBarItem included, verified by [[[NSAlert alloc] yaddayadda] show]; right after setting the array, but I've been looking for any little mistake for the last two days and I'm out of ideas.

Anyone else ever run into the disappearing tabBarController?

lord funk
Feb 16, 2004

chimz posted:

You should use whatever interface most matches the operations you're trying to perform, and let it worry about how to do that most optimally.

This was my original reason to make the switch to NSSet, but after a bit of research it's probably going to be just as hard to keep track of where my objects are than my silly index following system. I think I have a better idea of when to use which now, but for this program it's not worth the redesign.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

lord funk posted:

This was my original reason to make the switch to NSSet, but after a bit of research it's probably going to be just as hard to keep track of where my objects are than my silly index following system. I think I have a better idea of when to use which now, but for this program it's not worth the redesign.

This might have nothing to do with anything but NSIndexSet makes keeping track of indexes considerably easier (and you can even ask an array for objectsAtIndexes:).

OHIO
Aug 15, 2005

touchin' algebra

modig posted:

Now I've actually done this, and it seems to work so far. Thanks.

So now I need to assign a view to the second display. Should I create a new ViewController for the second display? Then if I want to have the second display respond to say a button press on the iPhone's ViewController, should I message the AppDelegate and have the AppDelegate message the second view controller? That seems sort of inefficient. Currently the window (iPhone) and secondWindow (TV) are properties of the AppDelegate. Maybe I should pass the secondWindow (or at least it's view property?) object to the primary ViewController?

What do you want to do with the second display?

Speaking of external displays, I had some custom code to show some stuff on it back on iPad 1, but I've been getting reports of that breaking the cool iPad2 external mirroring feature. Is this a known conflict or is my code just bad? How can I detect if they're doing the iPad2 mirroring?

modig
Aug 20, 2002

OHIO posted:

What do you want to do with the second display?


I made a separate ViewController for the external display, I'll see how that goes. I don't need to do much, just show some static elements and change their colors, and maybe a progress bar. I want the best level of timing control I can get between changes to the external display and the rest of my app. Is there any way to know when a frame is actually output over hdmi or component, vs when I change something in the View?

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice
Only in the sense that you can get the frame rate. There is no way to know if there is a delay in the TV, receiver, etc... Though that is rare on most equipment these days.

modig
Aug 20, 2002

Ender.uNF posted:

Only in the sense that you can get the frame rate. There is no way to know if there is a delay in the TV, receiver, etc... Though that is rare on most equipment these days.

I don't need to know when it shows up on the TV, just when it was sent to the TV. I assume the frame rate will be 60fps out, but I'm not even sure if that is true.

wellwhoopdedooo
Nov 23, 2007

Pound Trooper!
Sweet gently caress, finally have it working.

I have a window-based application. The main window XIB is just the default that's created with the project. I made another XIB that consists of only a UITabBarController. That XIB's outlets are as follows:

tbc = the UITabBarController
view = tbc.tabBar

In my application:didFinishLaunchingWithOptions: I do this:

code:
MyViewCtrlSpec* tbcvc = [[MyViewCtrlSpec alloc] initWithNibName:@"MyViewCtrlSpec" bundle:nil];

[self.window addSubView:tbcvc.view];  // This is tbc.tabBar
self.window.rootViewController = blah.tbc;

tbcvc.tbc.viewControllers = [[NSArray alloc] initWithObjects:
  [[v1 alloc] initWithNibName:@"v1" bundle:nil],
  [[v2 alloc] initWithNibName:@"v2" bundle:nil],
  nil
];

[self.window makeKeyAndVisible];
Can anybody tell me why I have to do it this exact way, and (even better) how I could have told that this is the way to do it? Is adding the tabBar itself as a subview right? It doesn't feel right, but it doesn't work without it. I've read that a UITabBarController needs to be the root view controller, and I suppose that's what I'm doing since a.) it's working and b.) I'm setting the property on the window, but am I actually doing this right? Am I doing something like when I first started learning C++ and blithely accessed freed memory that just hadn't been overwritten yet and didn't find out until I made it complex enough?

Also, as I'm picturing it, if the code posted was exactly what was in my application:blahblah: function, I'd have three memory leaks, one for each view, since tbcvc is a local variable and the array calls retain on everything that's added to it. Is that right? And if it is (or even if it isn't) why does it keep working when I release tbcvc in the function--is it just that the program isn't complex enough yet? Would the MyViewCtrlSpec functions like didReceiveMemoryWarning: still work? And if so, how, since as far as I'm aware, it's retain count would be 0?

gently caress I miss being able to run .NET Reflector on the system libraries so much.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice
UISplitView question time!

I have a split view, all is well. When the user does something in the detail (right) side, I change both viewControllers of the split view a la:

code:
//in my UISplitViewController subclass

// make an instance of SomeViewController
// make an instance of AnotherViewController
self.viewControllers = [NSArray arrayWithObjects: someVC, anotherVC, nil];
self.delegate = anotherVC;
The views change as expected. However, if I'm in portrait mode, I don't get the popover button that's created from splitViewController:willHideViewController:withBarButtonItem:forPopoverController: when the new views appear. If I rotate to landscape and back, it behaves as expected.

Is there a way to force the 'willHide' business when switching out view controllers in a split view? If not, how would I go about manually re-creating it?

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

modig posted:

I don't need to know when it shows up on the TV, just when it was sent to the TV. I assume the frame rate will be 60fps out, but I'm not even sure if that is true.

Well if you use CADisplayLink to handle your refreshing on the external window, you can request a specific multiple of the display framerate which is 60hz by default (so 2.0 gives you 30fps) by setting the frameInterval property. You can also use timestamp and duration to figure the real framerate if needed. That's the most reliable way to know and is much better than a timer/etc.


I'm not sure exactly why you expect there to be a delay or how precise it needs to be. If your requirements are simpler, you can use CoreAnimation completion blocks when making updates on the external view and you will know it is done updating. Eg: use it to update a progress bar and when the last animation frame is rendered your completion block will fire.

modig
Aug 20, 2002
Can I set the exposure of the camera directly? I can lock it so it doesn't change with
code:
        [device setExposureMode:AVCaptureExposureModeLocked];
and I can kind of set it based on part of the field of view using
code:
        device.exposurePointOfInterest = some GCPoint;
        [device setExposureMode:AVCaptureExposureModeAutoExpose;
But how do I say exposureTime=2ms or whatever I want it to be? I'm pretty sure Camera+ does this since you can adjust the exposure by sliding two fingers around, so it is probably possible. I might even settle for just knowing what the exposure setting is at any given time, my best guess currently is to time how long it takes to take a picture.

The question has been asked but remains unanswered on StackOverflow:
http://stackoverflow.com/questions/4745270/can-the-exposure-time-be-manually-adjusted-for-an-ios-cameras

edit: Thanks Ender.unF, CADisplayLink looks perfect.

modig fucked around with this message at 04:08 on Apr 30, 2011

samiamwork
Dec 23, 2006

wellwhoopdedooo posted:

Can anybody tell me why I have to do it this exact way, and (even better) how I could have told that this is the way to do it?

Reading the View Programming Guide and the docs for UIWindow should tell you what you need to know. But judging by your post you've already done that.

quote:

Is adding the tabBar itself as a subview right? It doesn't feel right, but it doesn't work without it. I've read that a UITabBarController needs to be the root view controller, and I suppose that's what I'm doing since a.) it's working and b.) I'm setting the property on the window, but am I actually doing this right?

I don't believe you need to do that. You're saying that if you don't have that addSubview: line that it doesn't work? What is "blah"? I would guess it's that your usage of "tbcvc.view" on that line is triggering the nib loading. When you comment out that line, your nib doesn't get loaded, and so your outlets are nil (this hinges on what "blah" is and I'm assuming that it's supposed to be "tbcvc"). If you replace that line with [tbcvc view] does it work? Assuming that MyViewCtrlSpec is a subclass of UITabBarController I think you should just be able to:

code:
self.window.rootViewController = tbcvc
According to the docs anyway. If my assumptions about the types and ancestry of objects is off, please correct me. That "blah" particularly has me puzzled.

I'm wondering why you're not leveraging nibs more, though. You should be able to have your UITabBarController nib reference your view controllers itself instead of doing it with code. Just drop a UITabBarController into your MainMenu.xib and customize it by dragging UIViewControllers into it. Subclass as needed.

quote:

Also, as I'm picturing it, if the code posted was exactly what was in my application:blahblah: function, I'd have three memory leaks, one for each view, since tbcvc is a local variable and the array calls retain on everything that's added to it. Is that right? And if it is (or even if it isn't) why does it keep working when I release tbcvc in the function--is it just that the program isn't complex enough yet? Would the MyViewCtrlSpec functions like didReceiveMemoryWarning: still work? And if so, how, since as far as I'm aware, it's retain count would be 0?

You're leaking four objects by my count: tbcvc, the two view controllers and the array. It still works when you add a release because you're not over-releasing, you're under-releasing. Adding a release just brings things into balance. I highly recommend that you read the Memory Management doc that Mikey-san linked earlier on this page. That should make things clearer.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
^^^^^
Well that was impressive timing.

wellwhoopdedooo posted:

tab bar stuff

Can you post your project, or an example of it? I'm having a hard time following you here.

quote:

three memory leaks, one for each view

You're also leaking the array, so four.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Lumpy posted:

code:
//in my UISplitViewController subclass

// make an instance of SomeViewController
// make an instance of AnotherViewController
self.viewControllers = [NSArray arrayWithObjects: someVC, anotherVC, nil];
self.delegate = anotherVC;
The views change as expected. However, if I'm in portrait mode, I don't get the popover button that's created from splitViewController:willHideViewController:withBarButtonItem:forPopoverController: when the new views appear. If I rotate to landscape and back, it behaves as expected.

Just to be clear, you don't receive the ...willHide... message at all? Or does it not come with a bar button item? Assuming the former, are you sure that you have the correct delegate assigned before you change the view controllers?

You may be able to get the split view controller to re-send the message by sending it didRotateFromInterfaceOrientation:. But I'd consider that a workaround for a bug which you should file if you can't find any other way to get a new bar button item after changing the master view controller.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

pokeyman posted:

Just to be clear, you don't receive the ...willHide... message at all? Or does it not come with a bar button item? Assuming the former, are you sure that you have the correct delegate assigned before you change the view controllers?

You may be able to get the split view controller to re-send the message by sending it didRotateFromInterfaceOrientation:. But I'd consider that a workaround for a bug which you should file if you can't find any other way to get a new bar button item after changing the master view controller.

Correct, I do not recieve it at all (until I physically rotate.) Since it behaves as expected every time after the initial change, the delegate is set properly. I'll give your workaround a whirl, thanks for the suggestion.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
I helped write an app that's been in review for a couple of weeks. The only communication from Apple was the boilerplate "this is taking a bit longer" note that was received a couple of days after submission. Since then, nothing. Has anyone else in this position managed to email, phone, or otherwise usefully make contact with someone to at least see what's up?

Obviously I don't think there are any infringements in the app but equally obviously that view isn't yet shared by those who matter.

wellwhoopdedooo
Nov 23, 2007

Pound Trooper!

pokeyman posted:

^^^^^
Well that was impressive timing.


Can you post your project, or an example of it? I'm having a hard time following you here.


You're also leaking the array, so four.

Sure. link

Right now I'm trying to figure out how to put the tabBarItem that's associated with a view in that view's XIB.

The reason I'm going to all this trouble is partially that I don't understand the stuff, and partially because I want to be able to pull a particular module out or put a new one in and only have to edit the code in a single place. I don't know how the in-app purchases thing works yet, and very likely won't end up using it, but I'd like to build the app in a way that it'd be easy to start using that as well if I do decide to go that way.

wellwhoopdedooo fucked around with this message at 01:30 on May 1, 2011

go play outside Skyler
Nov 7, 2005


pokeyman posted:

I helped write an app that's been in review for a couple of weeks. The only communication from Apple was the boilerplate "this is taking a bit longer" note that was received a couple of days after submission. Since then, nothing. Has anyone else in this position managed to email, phone, or otherwise usefully make contact with someone to at least see what's up?

Obviously I don't think there are any infringements in the app but equally obviously that view isn't yet shared by those who matter.

Well I guess it's a good sign, since an app of ours that was rejected was In Review for only 2 days!

It's hard to get in touch with anyone, Apple just doesn't care. Yeah, you paid 99$ and poo poo but really they couldn't care less. You're customer #223134 submitting app #3829847174 . The only times I've gotten in contact with them successfully was when I was trying to send my company's documents to get approved. But they had an interest since I was going to pay them 99 bucks.

Try this list:
http://developer.apple.com/contact/phone.html

I doubt the folks at Apple take more than 5 minutes reviewing an app.

LP0 ON FIRE
Jan 25, 2006

beep boop
I want an NSMutableArray as a property made in a class to use in another class, is this okay?

.h
code:
@interface HeroClass : CCLayer {
	NSMutableArray *_heroCollisPushPoints;
}

@property(nonatomic, assign) NSMutableArray *heroCollisPushPoints; // notice i assign not retain
.m
code:
#import "HeroClass.h"

@implementation HeroClass

@synthesize heroCollisPushPoints = _heroCollisPushPoints;

-(id) init{
    self = [super init];
    if (!self) {
        return nil;
    }
		
	_heroCollisPushPoints = [[NSMutableArray alloc] init]; //alloc it here
	
	[_heroCollisPushPoints insertObject:[NSValue valueWithCGPoint:CGPointMake( 16, 16)] atIndex:0];
	[_heroCollisPushPoints insertObject:[NSValue valueWithCGPoint:CGPointMake( 16,  0)] atIndex:1];
	[_heroCollisPushPoints insertObject:[NSValue valueWithCGPoint:CGPointMake( 16,-16)] atIndex:2];
	[_heroCollisPushPoints insertObject:[NSValue valueWithCGPoint:CGPointMake( 0,  16)] atIndex:3];
	[_heroCollisPushPoints insertObject:[NSValue valueWithCGPoint:CGPointMake(-16, 16)] atIndex:4];
	return self;
}

- (void) dealloc{
	[_heroCollisPushPoints release]; //release it here
	[super dealloc];
}

@end

samiamwork
Dec 23, 2006

NOG posted:

I want an NSMutableArray as a property made in a class to use in another class, is this okay?

I'm not really sure what you mean by that, but that code won't work. If you assign a new value to the heroCollisPushPoints property you'll leak your original array and when you dealloc the object you'll crash when you over-release the second array you were given. If you don't want to allow other objects to give heroCollisPushPoints a new value then you probably want readonly.

wellwhoopdedooo posted:

Sure. link

Right now I'm trying to figure out how to put the tabBarItem that's associated with a view in that view's XIB.

The reason I'm going to all this trouble is partially that I don't understand the stuff, and partially because I want to be able to pull a particular module out or put a new one in and only have to edit the code in a single place. I don't know how the in-app purchases thing works yet, and very likely won't end up using it, but I'd like to build the app in a way that it'd be easy to start using that as well if I do decide to go that way.

Thanks for posting the source. The reason it doesn't work without the addSubview: is because you're inadvertently loading the nib when you pass self.moduleSelectorViewController.view as a parameter. Replace that line with [_moduleSelectorViewController view] and it works.

Adbot
ADBOT LOVES YOU

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

Sir Davey posted:

Well I guess it's a good sign, since an app of ours that was rejected was In Review for only 2 days!

It's hard to get in touch with anyone, Apple just doesn't care. Yeah, you paid 99$ and poo poo but really they couldn't care less. You're customer #223134 submitting app #3829847174 . The only times I've gotten in contact with them successfully was when I was trying to send my company's documents to get approved. But they had an interest since I was going to pay them 99 bucks.

Try this list:
http://developer.apple.com/contact/phone.html

I doubt the folks at Apple take more than 5 minutes reviewing an app.


When my update was in review for over a week I emailed them and they responded fairly quickly. (Got another Storm Sim update pending right now actually). People are just impatient; it takes time to review stuff. I usually just submit the stuff and leave them to it.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply