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
Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Doctor w-rw-rw- posted:

Subjunctive: Would FB consider open-sourcing React iOS?

Also: Will the MemModels infrastructure be open-sourced at some point?

I can't really comment on possible future releases, though we really do like releasing useful stuff for iOS developers. Would depend on a few things, especially in the case of React iOS, which as described is a prototype.

I'm doing work now to get a handle on the overall arc of what we're releasing and how to do a good job tending to all of it. I hope we'll be able to get a bunch more stuff out after ASDisplayNode, but don't have specific plans to share.

Adbot
ADBOT LOVES YOU

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

pokeyman posted:

The interesting ones are the ones I haven't used long enough to dislike. The ones that generally seem to work are utterly uninteresting. But I'll throw one out there: ReactiveCocoa. A better language exists somewhere near where RAC is thrashing around.

I'd agree with this; I don't know what that future language looks like but if you take some pieces of functional programming, RX (and LINQ - IObservable<T> is the inverse of IEnumerable<T>), C#, and Objective-C then there must be something there. Rust is also interesting for a lot of reasons, though I don't necessarily agree with some of the design choices (though the recent proposal to split mut to owned/mut is a good step IMHO).


TICoreDataSync looked interesting but I haven't used it in anger.

I used to champion RestKit but I've decided I don't care for it; too complicated and over-designed, with a steep learning curve.

I yearn for a simple CoreData iCloud sync that works. I went through the trouble of creating a test project and filing a Radar during the iOS 7 beta and it seemed like the CoreData guys didn't understand what I was getting at and it's still broken and useless, 3 major iOS releases after it was made public.


Thinking about it, I can come up with a lot more stuff I hate than anything else. I don't know if that says something about me or not.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Ender.uNF posted:

I used to champion RestKit but I've decided I don't care for it; too complicated and over-designed, with a steep learning curve.
I really wanted to like RestKit, but after actually using it in a nontrivial project I concluded it's a whole bunch of code that doesn't actually do anything particularly useful. Ripping it out and replacing it with Mantle, AFNetworking and just using CoreData directly made things quite a bit simpler.

Glimm
Jul 27, 2005

Time is only gonna pass you by

Plorkyeran posted:

I really wanted to like RestKit, but after actually using it in a nontrivial project I concluded it's a whole bunch of code that doesn't actually do anything particularly useful. Ripping it out and replacing it with Mantle, AFNetworking and just using CoreData directly made things quite a bit simpler.

I've only used Mantle once but I had an annoying issue where if I declared a property an NSString and the server returned all numbers for that string the property would actually be set to an NSNumber by Mantle. Maybe I was just doing something silly?

lord funk
Feb 16, 2004

Just reclaimed 30GB of disk space by pruning ~/Library/Developer/Xcode/iOS DeviceSupport and ~/Library/Application Support/MobileSync/Backups

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

lord funk posted:

Just reclaimed 30GB of disk space by pruning ~/Library/Developer/Xcode/iOS DeviceSupport and ~/Library/Application Support/MobileSync/Backups

Just wait until you run disk utility and find HFS+ ate 20GB of free space :laugh:



Oh and side note: I now have to shutdown my laptop every time I'm done using it. No matter what I do I can't fix the failure to wake problem. Disabling TRIM and swapping back to the spinning disk that came with it had no effect, despite Apple closing my radar due to third party hardware. Re-confirmed my previous experience that filing radars is a waste of time/energy. Never was able to get anyone to tell me how to enable logging of hibernate restores on systems without a serial port, they just closed it immediately.

chimz
Jul 27, 2005

Science isn't about why, it's about why not.

Ender.uNF posted:

Oh and side note: I now have to shutdown my laptop every time I'm done using it. No matter what I do I can't fix the failure to wake problem. Disabling TRIM and swapping back to the spinning disk that came with it had no effect, despite Apple closing my radar due to third party hardware. Re-confirmed my previous experience that filing radars is a waste of time/energy. Never was able to get anyone to tell me how to enable logging of hibernate restores on systems without a serial port, they just closed it immediately.

Rumor has it that a firewire-thunderbolt adapter can do it:
http://prod.lists.apple.com/archives/darwin-kernel/2014/Jan/msg00002.html
https://twitter.com/pmjordan/status/413157837896835072

HookShot
Dec 26, 2005
To avoid getting the Invalid Product ID error with IAPs do you have to have a paid apps contract in effect with Apple? I've sent them my tax paperwork but it hasn't been processed yet, and that's literally the only thing I can think of that's the reason I'm still getting the error, I've gone through that checklist of 11 things to check when that's the error you're getting, and it's definitely nothing else.

ptier
Jul 2, 2007

Back off man, I'm a scientist.
Pillbug
Does anyone have any experience or advice with respect to CAScrollLayer's? Should I be using them if I am trying to design a timeline view (like a video editor / audio playback style timeline)? Is there something more useful than a CAScrollLayer? I am finding absolutely no info about it other than the Apple Developer documentation which usually means a "here be dragons" kind of deal.

EDIT: with respect to using an NSScrollView since at the moment I don't think I have very specific needs for this view per se.

ptier fucked around with this message at 02:17 on May 20, 2014

Doc Block
Apr 15, 2003
Fun Shoe

HookShot posted:

To avoid getting the Invalid Product ID error with IAPs do you have to have a paid apps contract in effect with Apple? I've sent them my tax paperwork but it hasn't been processed yet, and that's literally the only thing I can think of that's the reason I'm still getting the error, I've gone through that checklist of 11 things to check when that's the error you're getting, and it's definitely nothing else.

Yeah, pretty sure you need the paid contract.

HookShot
Dec 26, 2005

Doc Block posted:

Yeah, pretty sure you need the paid contract.

Oh thank God, awesome, thanks!

Doc Block
Apr 15, 2003
Fun Shoe
It could still be something else, but you do need the paid contract.

LP0 ON FIRE
Jan 25, 2006

beep boop
Is there anything that I'm missing that's different between CGPoint and CGVector aside from their names? They both take CGFloats but the CGVector's coordinates are signified by dx and dy, instead of just x and y.

The reason I'm asking is because I'm curious. I've been using CGPoint for velocities and it hasn't occurred to me until now to use CGVector.

LP0 ON FIRE fucked around with this message at 15:23 on May 20, 2014

Kallikrates
Jul 7, 2002
Pro Lurker
I'm going to say its all semantics in how you want to represent your data in code, if you want var.dx over var.x. Interestingly CIVector has a constructor for point but not CGVector. I've seen several libraries where vector types made for more clear parameter types but points are used.

Edit: unless you find yourself frequently having to convert from one to the other when interfacing with other api.

lord funk
Feb 16, 2004

:lol: I have an automated screenshot method, and I left it running while I went to lunch. Came back to 4,000 screenshots. :)

Normy
Jul 1, 2004

Do I Krushchev?


I'm very new to iOS development. I'm trying to create and application with a Tab Controller and I want to also have a custom timer view that is present on every tab. Is this something I can do in IB or do I have to do it programmatically?

toiletbrush
May 17, 2010
Does anyone know why Apple have gotten rid of the AudioUnit development templates, or where I can get them from?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

toiletbrush posted:

Does anyone know why Apple have gotten rid of the AudioUnit development templates, or where I can get them from?

If you're really desperate, you can download an old version of Xcode and extract them.

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

Normy posted:

I'm very new to iOS development. I'm trying to create and application with a Tab Controller and I want to also have a custom timer view that is present on every tab. Is this something I can do in IB or do I have to do it programmatically?

Depends on what you mean by "custom timer view".

You can create a container view controller that has two children - the timer and the tab controller. It would be responsible for the layout and so on. Be aware that the tab controller doesn't necessarily like not being the root view controller and can get a bit testy. If you just want to drop your timer view on each of the tab's content views then that works, though it is duplicated obviously.

I'd probably go for having my own base view controller inheriting from UIViewController, then use that as the class for the tab content view controllers in IB/Storyboards. That base class' job would be to inject the timer view with layout adjustments as needed. That keeps the tab controller happy as the root. However due to the way Xcode/IB work there is no "design time" mode so you won't see any of that in the Interface Builder design views. You'll just have to trust that it works at runtime.


So the short version is just do it in code. Interface Builder has nothing in common with other GUI designers (like VS WinForms for example). You cannot and should not expect to get your UI look setup in IB; you are just creating a rough outline and will polish it up in code.

duck pond
Sep 13, 2007

I'm having horrible problems with a UICollectionView I am using as a keypad with many buttons.

When a touch begins, a cell is highlighted, fair enough - but I’d like a cell to *unhighlight* when a touch is released.

Currently I get around this by calling reloadData every time basically anything happens, but, as I have canCancelContentTouches turned on, when you scroll on top of a cell, the cell gets stuck in the highlighted position. :bang:

Is this doable in a sane or reasonable way or am I fundamentally misunderstanding the way a UICollectionView is supposed to be used?

lord funk
Feb 16, 2004

duck pond posted:

Currently I get around this by calling reloadData every time basically anything happens, but, as I have canCancelContentTouches turned on, when you scroll on top of a cell, the cell gets stuck in the highlighted position. :bang:

You want to avoid calling reloadData as much as possible. A simple solution for highlighting is to subclass UICollectionViewCell and add your highlight methods to -touchesBegan: -touchesEnded: and -touchesCancelled:.


duck pond posted:

Is this doable in a sane or reasonable way or am I fundamentally misunderstanding the way a UICollectionView is supposed to be used?

No one understands how UICollectionViews are supposed to be used. No one. :colbert:

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

lord funk posted:

No one understands how UICollectionViews are supposed to be used. No one. :colbert:

If a UICollectionView falls in the forest, does it make a sound?

Doc Block
Apr 15, 2003
Fun Shoe
Doesnt UICollectionView have methods that your delegate can implement to be notified when a cell is going to be highlighted (so that you can decide if the cell even should be highlighted)? Can't you just use that to be notified when a cell has been highlighted and then unhighlight it a split second later?

edit: also, my view is that if you want a button, or button-like behavior, then use a button. Otherwise you wind up reimplementing stuff that UIButton gives you for free.

Just make a grid of buttons, and tag each one appropriately. Have them all use the same method when tapped, and determine which got tapped by its tag. You can use autolayout or a small amount of simple manual layout if you're worried about it working on different screen sizes.

Doc Block fucked around with this message at 20:32 on May 24, 2014

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Ender.uNF posted:

If a UICollectionView falls in the forest, does it make a sound?

Only if you implemented the correct delegate method.



:downsrim:

duck pond
Sep 13, 2007

lord funk posted:

You want to avoid calling reloadData as much as possible. A simple solution for highlighting is to subclass UICollectionViewCell and add your highlight methods to -touchesBegan: -touchesEnded: and -touchesCancelled:.

Heyyyyyyyy lord funk you're a genius. Brb

duck pond
Sep 13, 2007

It worked!

duck pond
Sep 13, 2007

Wait, no, no it didn't

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer
Just hold the purple theme until a future release, clearly.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Ship it once, and then it's not a regression so you can keep kicking it down the road forever.

duck pond
Sep 13, 2007

i love my purple theme ;-*

Manic Mongoose
Aug 5, 2010
I'm working my way through a course for development and one thing I've been trying to wrap my head around is delegates. I understand their function, but what I need help clarifying is their assignment.

Given that I have a view controller A and view controller B

A references the B delegate where B defines the protocol.

So when A is set as B's delegate through a segue, are we saying that in B, we'll be using A's implementation of the protocol methods?

and in this sense, is B used just to pass information to A so it can perform something for itself?(A).

What I'm mainly confused about is: "is the implementation working for A or B".

If anyone can shed some light for me that'd be great.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Manic Mongoose posted:

What I'm mainly confused about is: "is the implementation working for A or B".

B. It's delegating various decisions and/or calculations to A.

Think of it as B sending a message to A saying "help me out, what happens when this row of my table is selected?"

There's a maxim, "you call a library, but a framework calls you". If you can puzzle on that and know which side delegation is on, you'll be set.

Filburt Shellbach
Nov 6, 2007

Apni tackat say tujay aaj mitta juu gaa!

duck pond posted:

Wait, no, no it didn't



Try adding a tap gesture recognizer to each of the collection view cells. That should let it interact properly with the collection view's pan gesture recognizer.

duck pond
Sep 13, 2007

Filburt Shellbach posted:

Try adding a tap gesture recognizer to each of the collection view cells. That should let it interact properly with the collection view's pan gesture recognizer.

I got it working right in the end, I wound up overriding -touchesBegan: et al like lord funk told me to (you don't need a tap gesture recogniser as UICollectionViewCell already inherits from UIResponder).

But instead of using these to set the highlight on the cell I added an additional property, tapped, which I use to set the alpha value on the cell, while highlighted now does nothing. Hooray

Doh004
Apr 22, 2007

Mmmmm Donuts...
Why the gently caress are UITextViews atrocious in iOS 7?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Doh004 posted:

Why the gently caress are UITextViews atrocious in iOS 7?

They were completely redone with insufficient engineering resources.

Doctor w-rw-rw-
Jun 24, 2008

Doh004 posted:

Why the gently caress are UITextViews atrocious in iOS 7?

Because they're no longer secretly UIWebViews?

Specific problem?

Doh004
Apr 22, 2007

Mmmmm Donuts...
I have a UITextView inside a UICollectionView that's reusable. Sometimes, and I don't know why, when I update an existing view with new text, the text doesn't show up at all. I'm trying to dig into it more, but it happens randomly and if I scroll back and forth over the cell, the text will eventually show up/hide itself again.

lord funk
Feb 16, 2004

Doh004 posted:

I have a UITextView inside a UICollectionView that's reusable. Sometimes, and I don't know why, when I update an existing view with new text, the text doesn't show up at all. I'm trying to dig into it more, but it happens randomly and if I scroll back and forth over the cell, the text will eventually show up/hide itself again.

On the face of it it sounds like a reusable view issue. i.e. - you're dequeuing a reusable view and not setting that view's textview text when you do it. Or you're trying to hold onto a reference to a cell to make changes, which is a bad idea. Just throwing these out there.

Adbot
ADBOT LOVES YOU

Doh004
Apr 22, 2007

Mmmmm Donuts...

lord funk posted:

On the face of it it sounds like a reusable view issue. i.e. - you're dequeuing a reusable view and not setting that view's textview text when you do it. Or you're trying to hold onto a reference to a cell to make changes, which is a bad idea. Just throwing these out there.

Shoot me now. I had an old assignment of autoresizingmasks that I'd forgotten about in my view's init, which was automatically changing its height to 0 (god knows why) after I was setting its height. Now it works!

But still, screw UITextViews!

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