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
haveblue
Aug 15, 2005



Toilet Rascal
I'm trying to enable accessibility labels for a tableview that's a child of a second tableview and there doesn't seem to be any way to do this. The built-in traversal doesn't seem to see the child at all, and attempting to use UIAccessibilityContainer to manually expose the second table not only doesn't work but breaks the accessibility of other non-table child views.

Is there any way at all to do this? I know table views are not supposed to be children of each other but I was able to find workarounds for the other issues that came up.

Adbot
ADBOT LOVES YOU

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

haveblue posted:

I'm trying to enable accessibility labels for a tableview that's a child of a second tableview and there doesn't seem to be any way to do this. The built-in traversal doesn't seem to see the child at all, and attempting to use UIAccessibilityContainer to manually expose the second table not only doesn't work but breaks the accessibility of other non-table child views.

Is there any way at all to do this? I know table views are not supposed to be children of each other but I was able to find workarounds for the other issues that came up.

I'm guessing UITableView implements UIAccessibilityContainer to expose cells (and deal with cell reuse etc.) and that implementation is probably messing you up. Implementing UIAccessibilityContainer yourself is probably the right way to go, but then you're responsible for replicating everything that UIView and UITableView do themselves.

haveblue
Aug 15, 2005



Toilet Rascal
I thought that as well, but it doesn't seem to be that simple. I can see it querying for the accessibility elements related to the table, and that it stops its search when it locates the correct one that was tapped on, but once the accessibility element is returned it doesn't do anything it with- there's no response from the UI or the inspector.

LP0 ON FIRE
Jan 25, 2006

beep boop
I can across a leak in my app that I'm working on, and I realized I could be doing something very fundamentally wrong. I'm creating an instance of a subclass in another class and allocating an object from the instance that's unique to that subclass and not it's super. I'm not entirely sure what the leak is being caused by, because I might have a misunderstanding about how it can be allocated (and where), and how it can deallocated. I've been using Obj-C for a while and it kind of freaks me out that I may have been doing this wrong.

I'm not using ARC because it's pre-ARC and fairly large, depends on stuff that doesn't use it, etc.

I have a pretty detailed explanation on StackOverflow: http://stackoverflow.com/questions/23938669/obj-c-allocating-a-subclassed-object-from-another-object-and-releasing

Doctor w-rw-rw-
Jun 24, 2008

LP0 ON FIRE posted:

I can across a leak in my app that I'm working on, and I realized I could be doing something very fundamentally wrong. I'm creating an instance of a subclass in another class and allocating an object from the instance that's unique to that subclass and not it's super. I'm not entirely sure what the leak is being caused by, because I might have a misunderstanding about how it can be allocated (and where), and how it can deallocated. I've been using Obj-C for a while and it kind of freaks me out that I may have been doing this wrong.

I'm not using ARC because it's pre-ARC and fairly large, depends on stuff that doesn't use it, etc.

I have a pretty detailed explanation on StackOverflow: http://stackoverflow.com/questions/23938669/obj-c-allocating-a-subclassed-object-from-another-object-and-releasing

Objective-C code:
[[NSArray alloc] initWithArray:finalArray];
I know of no reason this should not be [finalArray copy]. Same essential meaning but saves memory when your NSArray is already immutable.

StackOverflow question posted:

NSArray instance variable
Uh, tempClassB.myNSArray looks like a property access, not an ivar. What does your property declaration look like?

---

Anyways, the usual rule is that the retain-release pairs should always match within the same class. If Class M +1's an NSArray, it should -1 it in class M. Likewise for Class B. So assuming your property is well-behaved, when you do "tempClassB.myNSArray = [finalArray copy];" or "tempClassB.myNSArray = [[NSArray alloc] initWithArray:finalArray];", you're +1'ing it in M, and your property setter is +1'ing it in B. Without a matching autorelease in M, you do indeed have a leak.

Make your myNSArray use @property (nonatomic, copy, ...etc,whatever) NSArray *myArray;, then just change it to tempClassB.myNSArray = finalArray. Or if you really need to copy/re-allocate an array, autorelease it in M.

LP0 ON FIRE
Jan 25, 2006

beep boop
Thanks Doctor. I totally used the wrong terminology there, and I need to get better at that. I don't know what I was thinking of allocating it there (M) and somehow have it allocate in B. Allocating it in B, works fine now.

Doctor w-rw-rw-
Jun 24, 2008

LP0 ON FIRE posted:

Thanks Doctor. I totally used the wrong terminology there, and I need to get better at that. I don't know what I was thinking of allocating it there (M) and somehow have it allocate in B. Allocating it in B, works fine now.

That's vague enough that I'm not totally sure you're doing it The Right Way™, but I hope that you are. You shouldn't need to allocate an array in B at all. If your property in B has the 'copy' attribute it should just retain an NSArray (and copy it when it's an NSMutableArray, leaving the original alone).

LP0 ON FIRE
Jan 25, 2006

beep boop

Doctor w-rw-rw- posted:

That's vague enough that I'm not totally sure you're doing it The Right Way™, but I hope that you are. You shouldn't need to allocate an array in B at all. If your property in B has the 'copy' attribute it should just retain an NSArray (and copy it when it's an NSMutableArray, leaving the original alone).

Thanks, because I still wasn't doing it right. :D

So I was eventually trying the right way, and it kept reporting a leak on a commented out line. I had to close the Instruments window, Profile, and click leaks again. I guess this is normal protocol because it analyzes the code once when it profiles, and never after you make changes in the code, until you go up to the menu and click Profile again.

Doctor w-rw-rw-
Jun 24, 2008

LP0 ON FIRE posted:

Thanks, because I still wasn't doing it right. :D

So I was eventually trying the right way, and it kept reporting a leak on a commented out line. I had to close the Instruments window, Profile, and click leaks again. I guess this is normal protocol because it analyzes the code once when it profiles, and never after you make changes in the code, until you go up to the menu and click Profile again.

I suggest installing DerivedData Exterminator via Alcatraz and clicking that button often and with extreme prejudice.

LP0 ON FIRE
Jan 25, 2006

beep boop

Doctor w-rw-rw- posted:

I suggest installing DerivedData Exterminator via Alcatraz and clicking that button often and with extreme prejudice.

Will do. Thank you!

I've also had problems with building and still reporting errors/warnings, even though there aren't any, so hopefully it will help that too.

Hughlander
May 11, 2005

Who's up for WWDC goon meet? PM me with contact details.

Doctor w-rw-rw-
Jun 24, 2008

Hughlander posted:

Who's up for WWDC goon meet? PM me with contact details.

I am! PM'd.

Doctor w-rw-rw-
Jun 24, 2008
I feel like I'm missing something obvious, but setting scroll insets don't seem to have any effect.

How do have a (non-sticky) section header in a UICollectionView (with a flow layout) which starts offscreen, i.e. on initial display, the header is hidden?

Echo Video
Jan 17, 2004

Doctor w-rw-rw- posted:

I feel like I'm missing something obvious, but setting scroll insets don't seem to have any effect.

How do have a (non-sticky) section header in a UICollectionView (with a flow layout) which starts offscreen, i.e. on initial display, the header is hidden?

Assuming this is the first section, can you set contentOffset to have the collection view scrolled down a bit initially?


also: some of you dinguses work at facebook, right? I'm interviewing there sometime next month.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Doctor w-rw-rw- posted:

I feel like I'm missing something obvious, but setting scroll insets don't seem to have any effect.

How do have a (non-sticky) section header in a UICollectionView (with a flow layout) which starts offscreen, i.e. on initial display, the header is hidden?

After loading the collection view, set its contentOffset.y to the height of the header.

If the collection view is shorter than its bounds's height you can pad out the difference with a bottom contentInset. You'll want to recalculate that inset whenever the contents change or the bounds change, otherwise someone could scroll the whole contents off the screen.

Doctor w-rw-rw-
Jun 24, 2008
:doh: Okay, so I'm not insane, and I was doing it the right way, I just forgot that I'm resetting the scrollView's contentInsets externally since I'm doing some scrollview gesture recognizer hacking mixed with a contained UINavigationController, mixed with using Pop for animations.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Doctor w-rw-rw- posted:

:doh: Okay, so I'm not insane, and I was doing it the right way, I just forgot that I'm resetting the scrollView's contentInsets externally since I'm doing some scrollview gesture recognizer hacking mixed with a contained UINavigationController, mixed with using Pop for animations.

I've set more than a few breakpoints on -[UIScrollView setContentOffset:animated:] to see what the hell was going on.

Axiem
Oct 19, 2005

I want to leave my mind blank, but I'm terrified of what will happen if I do
Quiet in this thread today...I guess we're all on pilgrimage to WWDC?

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

Axiem posted:

Quiet in this thread today...I guess we're all on pilgrimage to WWDC?

Or wallowing in self-pity; this is my third or fourth attempt to get tickets that failed.

ManicJason
Oct 27, 2003

He doesn't really stop the puck, but he scares the hell out of the other team.
Or preparing for a first job interview in three years. Good thing I'm not sold on moving to SF for this job or even doing full time work, so it's not stressful. Contract work looks pretty appealing short term. It's nice having that as a baseline to which to compare any job opportunity.

Who am I kidding? I'm also wallowing in self pity.

Doctor w-rw-rw-
Jun 24, 2008
I'm using my boss's ticket, so my self-pity will be conditional on being able to get in the building. I forget - do they check IDs? Or just badges?

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

I'm pretty sure Apple has advised us to share badges in the past. I know we've done so, certainly.

HiriseSoftware
Dec 3, 2004

Two tips for the wise:
1. Buy an AK-97 assault rifle.
2. If there's someone hanging around your neighborhood you don't know, shoot him.
Edit: Wrong thread!

HiriseSoftware fucked around with this message at 06:27 on Jun 2, 2014

Hughlander
May 11, 2005

Doctor w-rw-rw- posted:

I'm using my boss's ticket, so my self-pity will be conditional on being able to get in the building. I forget - do they check IDs? Or just badges?

You need id to pick up the badge after that it's just that you have one.

Doh004
Apr 22, 2007

Mmmmm Donuts...

Ender.uNF posted:

Or wallowing in self-pity; this is my third or fourth attempt to get tickets that failed.

Ding ding ding ding ding!

:saddowns:

lord funk
Feb 16, 2004

Yeah I'm waiting for the relentless despair to let up, but that's not happening. Stupid lottery. :/

kitten smoothie
Dec 29, 2001

https://github.com/WebKit/webkit/blob/master/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h

A UIWebView replacement in 10.10 and iOS 8?

code:
#if TARGET_OS_IPHONE
WK_CLASS_AVAILABLE(10_10, 8_0)
@interface WKWebView : UIView
#else
WK_CLASS_AVAILABLE(10_10, 8_0)
@interface WKWebView : NSView
#endif

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

ManicJason posted:

Or preparing for a first job interview in three years. Good thing I'm not sold on moving to SF for this job or even doing full time work, so it's not stressful. Contract work looks pretty appealing short term. It's nice having that as a baseline to which to compare any job opportunity.

Who am I kidding? I'm also wallowing in self pity.

Haven't heard anything from Apple; they must not be hurting for people that badly.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

kitten smoothie posted:

https://github.com/WebKit/webkit/blob/master/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h

A UIWebView replacement in 10.10 and iOS 8?

code:

#if TARGET_OS_IPHONE
WK_CLASS_AVAILABLE(10_10, 8_0)
@interface WKWebView : UIView
#else
WK_CLASS_AVAILABLE(10_10, 8_0)
@interface WKWebView : NSView
#endif

Looks like the NSURLSession treatment, modernizing a crusty old API. Hopefully it isn't relegated to private API for a year.

Fate Accomplice
Nov 30, 2006




New dev tools?!

EDIT: Oh yeah, following the thread there, I just posted here cause holy poo poo that was unexpected.

Fate Accomplice fucked around with this message at 18:14 on Jun 2, 2014

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Malloreon posted:

New dev tools?!

There's a TVIV thread in SH/SC, though obviously dev tool chat is on point here too!

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
I made a thread for talking about Swift, if you're interested.

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

It's like someone decided to fulfill the John Siracusa wish list, then struck a new filesystem from it so they'd still have something to troll him with.

Fate Accomplice
Nov 30, 2006




Ender.uNF posted:

It's like someone decided to fulfill the John Siracusa wish list, then struck a new filesystem from it so they'd still have something to troll him with.

Siracusa with nothing to complain about would wither and die.

Note: I love Siracusa and still mourn the end of Hypercritical. ATP is great but not the same.

kitten smoothie
Dec 29, 2001

Open the new xcode release notes and search for radar #17022386.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

kitten smoothie posted:

Open the new xcode release notes and search for radar #17022386.

Oh poo poo!

Edit: Oh hmm, it looks like it's not even a secret. Look at your Simulator list. I suspect the Tools State of the Union is gonna be pretty drat interesting this year.

Edit2: Also the new XCode icon's hammer looks like it has a wasting disorder.

Edit3: I think the aforementioned thing is related to the share-card/activities stuff, at least in part.

ultramiraculous fucked around with this message at 20:58 on Jun 2, 2014

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer
Oh hey I don't have to buy Reveal anymore...

lord funk
Feb 16, 2004

ultramiraculous posted:

Oh hey I don't have to buy Reveal anymore...

Evidently neither did Apple.

lord funk
Feb 16, 2004

It is just a little buggy on my machine (does this every time):

https://www.youtube.com/watch?v=vi2vxq1Ueb8

lord funk fucked around with this message at 15:29 on Jun 3, 2014

Adbot
ADBOT LOVES YOU

Kallikrates
Jul 7, 2002
Pro Lurker
At first I was like "Scrub doesn't know how to capture a screen cast". :smugissar:

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