ios - cellForItemAtIndexPath of collectionView is not called when I reload the cells from a method of another class(navigationviewcontroller) -


i have viewcontroller in implementing collection view. have set delegate , datasource of collection view inside viewdidload of viewcontroller.the action trying implement if click button on navigationbar(which implemented programatically in navigationviewc) should reload collectionview cells in viewcontroller.but if add action selector navigation bar button function in navigationviewcontroller reloads data of collection view not calling cellforitematindexpath method.can me please

you should add barbuttonitem in regular viewcontroller:

override func viewdidload() {     super.viewdidload()     navigationitem.rightbarbuttonitem = uibarbuttonitem(title: "reload", style: .plain, target: self, action: "reloadbuttontapped") }  func reloadbuttontapped() {     println("reload") } 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -