MiMo42 / MMTabBarView

A Mac OS X tab bar view that works on 10.9+ with Xcode 9.3+. Pull requests welcomed.
http://mimo42.github.com/MMTabBarView/
243 stars 79 forks source link

No way to observe that the tabs were reordered #6

Closed tegtmeye closed 11 years ago

tegtmeye commented 11 years ago

Excellent work BTW. This saved me a lot of time.

This is a feature request.

Use case: You need to have your tabs ordered. For example, you want to save in your document model that you have tab foo, bar, and foobar in that order. So you come up with some scheme to maintain an index in your model somewhere. Now, when the user slides the tabs, there is no way to notice that this happened and update the model's index to reflect the change.

So is it easy to know that the user is sliding things around from the delegate method:

But there does not appear to be away to know that the user is done and get the final tab reordering.

So the feature request is a simple way to observe that a reordering (sliding) has taken place.

It seems that if there was another delegate method something similar to:

or maybe the delegate method:

that gets called at the appropriate time.

One might even be able to make that case that the delegate:

gets called at the end but seems less than optimal.

tegtmeye commented 11 years ago

thanks!