Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selection with no animation #14

Closed
toseefkhilji opened this issue Jan 10, 2017 · 8 comments
Closed

Selection with no animation #14

toseefkhilji opened this issue Jan 10, 2017 · 8 comments

Comments

@toseefkhilji
Copy link

toseefkhilji commented Jan 10, 2017

In my view there is favourite button. I want to set favbutton as selected.

So i have write this in viewDidLoad:
favButton.isSelected = true

but it shows animations when my view is loading.

I only want animations on favButton tap.

So is there any method for setting selected behaviour without animation? or how can achieve this?

@almatri
Copy link

almatri commented Jan 31, 2017

same issue with me , I have table with cells having faveButton.
I set the favButton to selected (if the cell belongs to favorites array) in the cellForRowAtindexPath delegate

And it is very annoying to see the favButton animate while I scrolling the table.

so please allow us to disable the animation .

@okipol88
Copy link
Contributor

okipol88 commented Mar 4, 2017

Hi All,

I added a pull request with the possibility to do just that - change the selection without animation.

#19

@FranciscoMkdir
Copy link

How?

@uknowmeright
Copy link

please merge this into Master branch. Thank you.

@eclair4151
Copy link

for anyone who doesn't mind pulling directly off of @okipol88 branch you can do this

in your pod file
pod 'FaveButton', :git => 'https://github.com/okipol88/fave-button', :branch => 'feature/selectionWithoutAnimation'

then in your code
myButton.setSelected(selected: true, animated: false)

@yarodevuci
Copy link

@eclair4151 hey, can you update to SWIFT 4

@s2mr
Copy link

s2mr commented Apr 26, 2018

I have published repository merge without animation and migrating to swift4.
https://github.com/kzumu/fave-button

@janselv
Copy link
Owner

janselv commented Sep 24, 2018

Solved by merging @okipol88 pull request #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants