Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Common API for allowing the consumer to customize any presented UI. #5

Closed
calebd opened this issue Nov 11, 2013 · 2 comments
Closed
Assignees

Comments

@calebd
Copy link
Owner

calebd commented Nov 11, 2013

No description provided.

@ghost ghost assigned calebd Nov 11, 2013
@calebd
Copy link
Owner Author

calebd commented Nov 14, 2013

I think I know how to solve this. https://github.com/SimpleAuth/SimpleAuth-Twitter#user-interface What do you think @soffes?

@soffes
Copy link

soffes commented Nov 14, 2013

Hmm. I solved a similar problem recently in a client app. It was using delegates instead of blocks, but it's the same idea. My stuff presents a modal view controller. If you implement the delegate method, it would just return. If you didn't it would present the modal and such in a reasonable fashion.

For SimpleAuth, it might make sense to make it more generic. Something like "about to show UI", "show UI", "finished showing UI". This would make things a lot more flexible. You should let the "show UI" block take an id argument that in Twitter's case is the action sheet, but it could be whatever.

I guess the main hangup is that you need to "show UI" after this. Maybe you should bake choosing accounts into SimpleAuth so any service can use it. This way you could have a standard way to select a list of accounts (in this case an action sheet). It might be handy for other stuff that can pull your list from keychain or something.

That or you'd need a way to say I'm about to display UI with this identifier. So something like "AccountSelect" or "WebAuthentication" so applications could do different stuff for different UI.

@calebd calebd closed this as completed Jan 16, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants