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

python - argument must be rect style object - Pygame -

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

c# - Better 64-bit byte array hash -