Dynamic height TableView in a Scroll View

  Рет қаралды 17,920

Divyesh Gondaliya

Divyesh Gondaliya

4 жыл бұрын

Thanks for the watching for more video hit the like button and please subscribe to my channel also don't forget to press bell icon thanks....
collectionview inside scrollview :- • Collectionview inside ...
My Social Media link is below
-------------
instagram :- / gdivyesh40
facebook :- gdivyesh14340#_

Пікірлер: 87
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
Collectionview inside Scrollview kzfaq.info/get/bejne/g62Bg7Wm1LrIhqM.html
20 күн бұрын
Your video is still a solution. Thank you :)
@khalidobaidy8724
@khalidobaidy8724 4 жыл бұрын
Brilliant!!!! I've been struggling with this issue for a long time and finally, it works!
@DivyeshGondaliya
@DivyeshGondaliya 4 жыл бұрын
Thank you for watching video. please do like and subscribe to this channel
@guilhermerangel7119
@guilhermerangel7119 2 ай бұрын
MUITO BOM ME SALVOU, MUITO OBRIGADOOO!!!!! 👍👍👍👍
@DivyeshGondaliya
@DivyeshGondaliya Ай бұрын
Hey there! If you enjoyed this video, don't forget to hit the like button and subscribe to my channel for more amazing content. And make sure to click the bell icon so you never miss an update! Thanks for your support! 😊
@hdtgamereview99
@hdtgamereview99 7 ай бұрын
thank you so much
@DivyeshGondaliya
@DivyeshGondaliya Ай бұрын
Hey there! If you enjoyed this video, don't forget to hit the like button and subscribe to my channel for more amazing content. And make sure to click the bell icon so you never miss an update! Thanks for your support! 😊
@ryanbagussusilo9931
@ryanbagussusilo9931 3 жыл бұрын
Amazing , Thankss !
@vinayakthite
@vinayakthite 2 жыл бұрын
Loved your video. Thank you.
@DivyeshGondaliya
@DivyeshGondaliya 2 жыл бұрын
please don't forget to like and subscribe to our channel Thank you for watching ....🙂
@ThuyNguyen-gw1dt
@ThuyNguyen-gw1dt 4 жыл бұрын
Thanks so much for your help!
@DivyeshGondaliya
@DivyeshGondaliya 4 жыл бұрын
Welcome ☺️ don't forget to like and subscribe to this channel ☺️
@pratikbajpai6208
@pratikbajpai6208 4 жыл бұрын
Thank you!! Brilliant solution
@DivyeshGondaliya
@DivyeshGondaliya 4 жыл бұрын
please subscribe to channel for more video like this
@kalariyasunny7110
@kalariyasunny7110 3 жыл бұрын
Thanks For Solution @divyesh
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
Welcome do not forget to subscribe
@lecongminh6192
@lecongminh6192 3 жыл бұрын
Thank you very much, it's very useful
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
welcome 😊 please don't forget to subscribe
@nwigberimoses5837
@nwigberimoses5837 3 жыл бұрын
Thanks man, you saved my life
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
DON'T FORGET TO SUBSCRIBE and hit the notification bell for more updates! 💕
@nwigberimoses5837
@nwigberimoses5837 3 жыл бұрын
@@DivyeshGondaliya sure
@abdallashawkyabdo2721
@abdallashawkyabdo2721 3 жыл бұрын
thanks it helped me a lot
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
Glad to hear that! Don't forget to subscribe us ...
@TheNikhil70
@TheNikhil70 3 жыл бұрын
This was very helpful. Thanks a lot. Will it still work with each cell having an expandable view?
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
yes
@caitin378
@caitin378 3 жыл бұрын
cool~
@ayt_daily
@ayt_daily 3 жыл бұрын
thankyou so much
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
Please don't forgot to subscribe us ....
@ryanbagussusilo9931
@ryanbagussusilo9931 3 жыл бұрын
How to implement this to expandable table view with some section ? its Same ? and I have 3 tabs to with table view
@rderemalparido
@rderemalparido 3 жыл бұрын
Hi! Great video, I have a question that I'm struggling with. Suppose I have the same case but I need three TableViews in the same viewController, all of them with dynamic height, how should I fix or implement that? Thanks!!
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
here is the solution for you override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?){ if(keyPath == "contentSize"){ if let tbl = object as? UITableView { if tbl == self.tbl_view { if let newvalue = change?[.newKey] { let newsize = newvalue as! CGSize self.tbl_view_height.constant = newsize.height } } } } }
@vietsublyrics104
@vietsublyrics104 3 жыл бұрын
@@DivyeshGondaliya Hi! Thanks for your tutorial, I also have problem with multiple tableview, Can you help me fix it. Here is my source code. override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) self.tblView.addObserver(self, forKeyPath: "contentSize", options: .new , context: nil) self.tblView2.addObserver(self, forKeyPath: "contentSize", options: .new , context: nil) } override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) self.tblView.removeObserver(self, forKeyPath: "contentSize") self.tblView2.removeObserver(self, forKeyPath: "contentSize") } override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { if keyPath == "contentSize" { if let tbl = object as? UITableView { if tbl == tblView { if let newValue = change?[.newKey] { let newSize = newValue as! CGSize self.tblHeight.constant = newSize.width } } else { if let newValue = change?[.newKey] { let newSize = newValue as! CGSize self.tblHeight2.constant = newSize.width } } } } }
@NishantNarola
@NishantNarola 3 жыл бұрын
Nice video but can you make video on dynamic collection view height with height constraint or any idea on how to achieve it with help of height constraint
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
yes you can manage with height constraint for collection view height
@umangb3149
@umangb3149 3 жыл бұрын
#1 solution!
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
Thank you 😊 please don't forget to share and subscribe to our channel
@MrAksp
@MrAksp 3 жыл бұрын
Thanks.. I was looking for this exactly. Can you also provide the source code
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
sure please give me a email id i will send it to you
@Maks7172
@Maks7172 4 жыл бұрын
need disable scrolling and: func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { let size = 10 tableViewHeight.constant = CGFloat(size) * UITableViewCell().frame.size.height return size }
@DuyNT397
@DuyNT397 4 жыл бұрын
Thanks for your tutorial , but i have 1 question , if 1 viewcontroller i have 2 uitableview and i want 2 uitableview have contentsize , how cant i do that ??
@DivyeshGondaliya
@DivyeshGondaliya 4 жыл бұрын
here is the solution .... don't forgot to like and subscribe .. override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?){ if(keyPath == "contentSize") && object is UITableView { if let newvalue = change?[.newKey] { if self.tableView == object as? UITableView { let newsize = newvalue as! CGSize self.tableHeight.constant = newsize.height } } } }
@talhaordukaya2204
@talhaordukaya2204 11 ай бұрын
@@DivyeshGondaliya Oh mann this saved my life. Thankssss
@HamidAli-dc9iq
@HamidAli-dc9iq 4 жыл бұрын
scrolling not working in my case
@rafeeqrahman9608
@rafeeqrahman9608 3 жыл бұрын
could you make a video for this topic in collectionview (Collectionview in scrollview)
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
here you go kzfaq.info/get/bejne/g62Bg7Wm1LrIhqM.html don't forget to subscribe us ....
@mahmoudamin8534
@mahmoudamin8534 3 жыл бұрын
what if you want to apply let's say like animation when a specific cell appears ?????????????????????
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
you can apply animation in a cell like normal tableview cell size is automatically increase ir decrease according
@firman7875
@firman7875 3 жыл бұрын
hai thanks for the video, but what if my scrollview not resize its content size?
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
check your constant its proper or not
@maidou8868
@maidou8868 3 жыл бұрын
Can I give me my project to solve the problem of not being able to scroll? Is the interface of the playback menu
@divyeshgondaliyaDivyesh
@divyeshgondaliyaDivyesh 3 жыл бұрын
yes sure send me in email
@aarfeenahmad480
@aarfeenahmad480 2 жыл бұрын
Giving Error Instance member 'height' cannot be used on type 'ViewController' Inside Observer
@carolineignacio7175
@carolineignacio7175 Жыл бұрын
remove the "class" after override function declaration. Do this " override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {}"
@gabrielsantillan9438
@gabrielsantillan9438 Жыл бұрын
Tanto lío para hacer solo eso?? 😂
@simpleswift1232
@simpleswift1232 4 жыл бұрын
please use camleCase
@wangshangming10
@wangshangming10 Жыл бұрын
My green view is not scrollable, does anyone have the same issue? Update, it works on iPhone SE simulator but not iPhone 14
@mychoicebhajan1732
@mychoicebhajan1732 3 жыл бұрын
Instance member 'tbl_height' cannot be used on type 'ViewController' Unable to solve issue plz suggest some thing went wrong
@faisalashrafwani7037
@faisalashrafwani7037 2 жыл бұрын
I had the same error. Check if you have selected: "override class func observeValue...." instead of "override func observeValue...". Remove the class.
@lakshmisravyagajavalli9310
@lakshmisravyagajavalli9310 4 жыл бұрын
The tableview height is not increasing? Please help me to solve the issue?
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
Please do all the step which i show in video
@manindersingh8171
@manindersingh8171 3 жыл бұрын
Can you please send me the cide
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
share your email here i send you the code
@saikrishna-qo3yl
@saikrishna-qo3yl 3 жыл бұрын
@maninder If u received the source code please send it to me
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
@@agung_laksana check your mail don't forget to subscribe us
@nurlanakylbekov7266
@nurlanakylbekov7266 2 жыл бұрын
02:08 how yellow view turned to gray? I don't understand what you did in 02:08
@DivyeshGondaliya
@DivyeshGondaliya 2 жыл бұрын
there i remove uiview height constant which is under the scrollview please don't forget to subscribe !!!
@nurlanakylbekov7266
@nurlanakylbekov7266 2 жыл бұрын
@@DivyeshGondaliya why? do i need to remove it too if I didn't get red error constraints?
@DivyeshGondaliya
@DivyeshGondaliya 2 жыл бұрын
@@nurlanakylbekov7266 yes you have to remove it because we have to give scrollview dynamic hight
@putshellothere
@putshellothere 4 жыл бұрын
Github project?
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
share your email i will send you project
@chithian5281
@chithian5281 3 жыл бұрын
it doesn't work
@patelmaheshumeshbhai4230
@patelmaheshumeshbhai4230 3 жыл бұрын
I have a problem
@patelmaheshumeshbhai4230
@patelmaheshumeshbhai4230 3 жыл бұрын
The tableview height is not increasing
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
@@patelmaheshumeshbhai4230 please chek your tableview constant
@patelmaheshumeshbhai4230
@patelmaheshumeshbhai4230 3 жыл бұрын
@@DivyeshGondaliya Thanks a lot 😎😎
@DivyeshGondaliya
@DivyeshGondaliya 3 жыл бұрын
@@patelmaheshumeshbhai4230 welcome please don't forget to subscribe us
@MrJamesieBoye
@MrJamesieBoye 3 жыл бұрын
On this line: self.tbl_height.constant = newSize.height I get this error: Instance member 'tbl_height' cannot be used on type 'ViewController' What does this mean
@syamilys9799
@syamilys9799 3 жыл бұрын
i got the same error , Can anybody help?
@faisalashrafwani7037
@faisalashrafwani7037 2 жыл бұрын
any help on this error please?
@faisalashrafwani7037
@faisalashrafwani7037 2 жыл бұрын
I had the same error. Check if you have selected: "override class func observeValue...." instead of "override func observeValue...". Remove the class.
Date Picker in a UITextField (iOS Tutorial)
9:46
Divyesh Gondaliya
Рет қаралды 597
TableView Height as Per Content Size in Swift5 : iOS
15:34
Pushpendra Saini
Рет қаралды 5 М.
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 11 МЛН
Задержи дыхание дольше всех!
00:42
Аришнев
Рет қаралды 3,8 МЛН
Fast and Furious: New Zealand 🚗
00:29
How Ridiculous
Рет қаралды 45 МЛН
Как создать UIScrollView программно? (Swift, Xcode, iOS)
22:35
iOS на практике
Рет қаралды 2,6 М.
JPEG is Dying - And that's a bad thing
8:09
2kliksphilip
Рет қаралды 19 М.
The secret to the UIScrollView
11:44
Swift Arcade
Рет қаралды 12 М.
Self Sizing Table View Cells
15:17
Code Pro
Рет қаралды 12 М.
How to Create a Horizontal Scroll View in Xcode
6:13
Kamryn Ohly
Рет қаралды 10 М.
Modding TikTok to only show Cat Videos
29:12
Bryce Bostwick
Рет қаралды 91 М.
How to Use Scroll Views in Xcode in 5 Minutes or Less
4:49
Kamryn Ohly
Рет қаралды 17 М.
Custom TabBar программно (Swift 5)
14:51
SwiftBook
Рет қаралды 10 М.
#21 UICollectionView. Уроки UIKit
38:50
justaSid
Рет қаралды 5 М.
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 11 МЛН