ios - UICollectionView fixed Content Size -


i'm trying create keyboard extension using uicollectionview (i try use uibuttons keyboard take long time load i'm trying use collection view maybe better).

my questions are:

  1. what better: have better responsiveness, should use xib or code ?
  2. my principle issue can't fix content size of collectionview layout can't fix height of cell (direction == uicollectionviewscrolldirectionvertical)

here's how i'm trying fix cell height:

- (cgsize)collectionview:(uicollectionview *)collectionview layout:(uicollectionviewlayout*)collectionviewlayout sizeforitematindexpath:(nsindexpath *)indexpath {        return cgsizemake(self.keyboardcollectionview.frame.size.width/keys_in_section.count, self.keyboardcollectionview.frame.size.height/sections.count); } 

using code width correct not height (this cause direction == uicollectionviewscrolldirectionvertical)

for first question both gives same responsiveness, if use storyboard designing easy.

for second one

http://www.raywenderlich.com/78550/beginning-ios-collection-views-swift-part-1

just go through link. may helps you.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -