ios - Swift class extension with protocol vs conforming to protocol -


in this tutorial, author uses extension flickrphotosviewcontroller: uitextfielddelegate , implements protocol method. have tested , author have done class flickrphotosviewcontroller: uicollectionviewcontroller, uitextfielddelegate , implemented methods in class. difference can see makes easier read , understand. design style or something?

is design style or something

very so. normal style separate class multiple extensions, each expressing class's adoption of 1 or more related protocols. separation has no functional meaning; class could have been expressed without separation.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -