you are the best! this is an understatement for you. please never stop making tutorials.
@locacocavola8 жыл бұрын
I love the way you implemented the activityIndicatorView on each StatusImageView. Again, thanks for what you're doing. Happy Sunday.
@LetsBuildThatApp8 жыл бұрын
Thanks Andrea, going the extra mile to demonstrate a concept goes a long way.
@TheKaushal86868 жыл бұрын
Your way of explaining things is way super than others.... thanks for yet another amazing video....
@samuelpmilanez4 жыл бұрын
And before i forget, congratulations! Your videos are amazing !
@shivamroy17758 жыл бұрын
You are awesome . I actually learn everything in so detail in your channel . You're great .
@LetsBuildThatApp8 жыл бұрын
Glad to help you on your coding journey Shivam
@pasib8 жыл бұрын
Once again an excellent tutorial! This one saved me a lot of time. Thank you Brian!
@LetsBuildThatApp8 жыл бұрын
Can I get a cup of coffee with the time saved?
@yogitamunde61347 жыл бұрын
Nice tutorial.all cache basic is covered ,,,Really helpful...
@LetsBuildThatApp7 жыл бұрын
Indeed, however there is much more about caching that I wish to go over in later videos.
@abhisheksitar8 жыл бұрын
Amazing tutorials , learnt a lot of stuff and made me a better programmer. Thank you.
@akzuki12108 жыл бұрын
This is amazing. Thanks a lot. Waiting for more tutorials
@LetsBuildThatApp8 жыл бұрын
Thanks, I like your haircut!
@TheYannsonnboys8 жыл бұрын
Your tutorials are amazing man. Thanks for that
@LetsBuildThatApp8 жыл бұрын
+Yannsonnboys Yannick Great to be of service to you.
@SteveWoznokav7 жыл бұрын
Hi Brian can you please make another video on how to properly clear the cache when it is full using different methods?
@infohpreet2 жыл бұрын
Great tutorial!! Thanks!!!
@art4ho6 жыл бұрын
Thanks again for your sharing!!! Really hero
@csrkn7 жыл бұрын
Thank you so much man. You really helped me a lot. Please keep up the great work!
@VivekVerma19938 жыл бұрын
Is it possible to make image height dynamic in the cell, as you have done with status textview. PS: when you have url of that image(dynamic content)
@michaelkornelakis85078 жыл бұрын
Man you are amazing! Thanks once again!
@megaman94225 жыл бұрын
there's something missing between this video and the one before it, in the one before it you didn't have FeedCell file and image url was not yet set up.
@rameshannadurai45236 жыл бұрын
Excellent tutorials. How did you add ActivityIndicatorView to FeedCell while downloading the image. It is not explained in this video, Is it in different video?
@samuelpmilanez4 жыл бұрын
What the better way? Use the default cache provided by NSURLSession or use my own cache maked using NSCache class? If i use NSURLSession and implement a cache using NSCache, therefore some images are cached twice? (NSURLSession and my NSCache object)
@haleemmilk8 жыл бұрын
You are amazing thanks alot for sharing your knowledge
@david-tracy6 жыл бұрын
Great work
@pankajchauhan91855 жыл бұрын
Hey, Brain I have a tableViewCell in which I am getting dynamic image size according to which I have to calculate image height but while using this code for getting image height. let imageURL = URL(string: strImageUrlPath) var imageData: Data? if imageData == nil { if let imageURL = imageURL { imageData = Data(contentsOf: imageURL) } } var img: UIImage? = nil if let imageData = imageData { img = UIImage(data: imageData) } scrolling of table view got stuck or some times zerk while scrolling . please give me some solution for that.
@AnuragKashyap177 жыл бұрын
Great Tutorial :D Thank you for this :) keep up the good work.
@aragorn3927 жыл бұрын
Thanks! Is there any reason you used a dataTask vs a downloadTask? Wouldn't you want to use a downloadTask for images?
@thanasistratigakis93608 жыл бұрын
Great tutorials! Subscribed
@LetsBuildThatApp8 жыл бұрын
+Thanasi Stratigakis thanks a lot, lots more coming!
@abhinaykumar10456 жыл бұрын
Hi Brian, Hope you are doing good. Such a nice tutorial. I have a question when should I use this tutorial method and when should I use third party lib like AFNetworking etc. Thanks in advance:)
@EvaristusEzekwem7 жыл бұрын
Awesome tutorials I must say Brian. You have influenced a lot of my coding style thanks a loooooooooooot. There's actually a gap between this video and the previous one. Some files (e.g Posts.swift, Extensions.swift, FeedCell.swift) weren't in the previous video. I have tried to recreate these files myself but I keep running into errors from the FeedCell.swift file. Please help. Thanks.
@shivakumarhiremath80135 жыл бұрын
Hi .. I am big fan your turorials..in this video you said how to use Nsurlsache ,can you tell us how to clear or reset the Nsurlcache when Nsurlcache becomes full
@johnhan8008 жыл бұрын
Excellent tutorial! Thank you so much, for saving my homework!! lol
@laujimmy92826 жыл бұрын
Thx for the great tutorial
@Somerandomname238 жыл бұрын
Hi, it's also work, when I disappear this view, and back to him? whether will be download again? I mean in NSURLCache way.
@Zakawaka458 жыл бұрын
Great video! But i have to ask, how did you learn about caching in swift, theres barely anything about it online
@david-tracy6 жыл бұрын
Would you need to change anything in case you were getting dynamic data? (some data may not be there anymore, new posts added)
@nicholaslue8 жыл бұрын
I'm tying to figure out how to do this with videos. I'm guessing it's different because the action to play the video calls the URL everytime.
@LetsBuildThatApp8 жыл бұрын
Hello Nicholas. You should be able to perform similar caching if you can get access to the downloaded video file. I've never had to handle this but I'd be surprised if this issue hasn't been solved on StackOverflow.
@MohitJain148 жыл бұрын
Great! Thank you.
@dillionwang58637 жыл бұрын
Good lesson! Veay helpful
@AlessandroArcidiaco8 жыл бұрын
Hi Brian, thank you for this amazing tutorial. One question: the images remains in cache when the app is in background mode?
@raymondong45046 жыл бұрын
Thanks for putting this together. Really helpful stuff for getting me started with ios dev. Really interested with the paid lessons on your site. Just a question though. There seems to be missing video in this series; factoring out the data and code for the loader and server calls. Tried searching from your list but couldn't find it. Thanks so much.
@LetsBuildThatApp6 жыл бұрын
Not sure if I actually show how to refactor the code. It's just simple practice to clean up projects after a while.
@thinkoreans8 жыл бұрын
Thanks for another great tutorial. I'm quite new to Swift but I see your way of set things up programmatically is somehow more organized and easier to see the whole picture. But I'm still on two minds whether I code my project without storyboard because I'm afraid I can't find good lessons on the internet when I hit a bump in the road. As you know, almost all the lessons use storyboard and your way is quite special. Can you suggest me any advice on this? What can be the best way to improve my coding or solve any issue when I do it programmatically?
@LetsBuildThatApp8 жыл бұрын
Like you mentioned above, doing things programmatically is more organized and easier to follow what is going on. Here's a statement that usually holds true: If you know how to do something in code, you will most likely know or will be able to figure out how to do it in a storyboard. I can't say that the inverse holds true. Also the major difference for me is that while I can use storyboards for a lot of projects, I can use the programmatic approach for all projects.
@PanagiotisGoutzianas7 жыл бұрын
Hi can i ask something?What happens if there is no internet connection , can someone see the images that were cached before?
@dopors4 жыл бұрын
Will this method also being use by WKWebView? let say i have a video intro(intro1.mp4) and of course within the WKWebView you are sending request(using interceptor(URLProtocol) you can browse each request within). If not are there any caching method that you can use for faster loading video?
@LetsBuildThatApp4 жыл бұрын
Yes, don't use WKWebView.
@CaffieneToCode7 жыл бұрын
You are a champ Brian! Your continuous efforts in making people understand things practically are much appreciated. I tried the way of caching that you explained in KZbin app. Somehow it doesn't work. Is there a change in implementation for swift 3/4?
@LetsBuildThatApp7 жыл бұрын
I would recommend looking at my cache implementation from LBTAComponents or browsing the source code for SDWebImage.
@guduruvamshikrishna73557 жыл бұрын
Finished project with Latest Swift syntax here: github.com/VamshiIITBHU14/FBClone
@aboutcarsyo7 жыл бұрын
Do you think the best way to link the tableView data to the imageViews etc. is with the didSet inside the custom cell class like you did here? I'm just asking because I used to link it in cellForRowAtIndexPath and since this video is a little older by now, maybe you found another way you would consider as better? If not I will change my code and also use didSet inside the cell class :) Thanks for you great videos, I learned a lot from you!
@LetsBuildThatApp7 жыл бұрын
It is best to keep your controllers really simple and not have them be aware of how cells are rendered. This way you implement separation of concern for your classes.
@aboutcarsyo7 жыл бұрын
Okay thanks a lot for your answer :) also performance wise it should be pretty good? Cause I had some problems with the scrolling sometimes it was a little choppy, just very little but noticeable
@joaquincorrales73838 жыл бұрын
Brian, thank you so much for the great tutorials. I have a question- would you have any idea why the scrolling in the collectionview seems very choppy even caching the images? Thanks
@LetsBuildThatApp8 жыл бұрын
Hi Joaquin, it could be your simulator that is choppy. Also, make sure you are storing the UIImage in the cache, also make sure the cache is actually getting back your uiimage objects instead of making another url request.
@joaquincorrales73838 жыл бұрын
Lets Build That App Hey Brian thanks for the reply. I'm actually experiencing it on my phone as that's where I'm testing on. The images are being cached and not being fetched more than necessary. I have also tried upping the default cache. Any other pointers? Thanks a lot man. Huge fan
@billionbucks53918 жыл бұрын
great job , best of luck man :)
@LetsBuildThatApp8 жыл бұрын
+Billion Bucks thanks for watching!
@dzaev36638 жыл бұрын
You lecture is really awesome. I learn the depth of swift from you. Thank You so much. And I have a quesiton. What do you refer at the starting point? I mean, I proceed to study in the order of this "How to create Facebook's news feed" playlist, but maybe it's different between a completed source code of "Dynamic cell content" part and the code of this lecture at starting point. So what the other viewers refer? I wonder how to proceed, thank you.
@LetsBuildThatApp8 жыл бұрын
Hello David, You should watch the entire FB tutorial series using this playlist: kzbin.info/aero/PL0dzCUj1L5JHDWIO3x4wePhD8G4d1Fa6N
@dzaev36638 жыл бұрын
Thanks for your reply, and I did refer the same playlist as you send me. But the source code is different, neither is the feed images. In the last part of "Dynamic cell content" lecture, the feed images is like DOG picture, JOBS picture seeing at 24:53. But in this lecture at start point, the feed images is totally different. Same in the source code.
@LetsBuildThatApp8 жыл бұрын
Yes the code changes a bit. Apologies, I didn't intend for these episodes to be continuous. These videos were shot way way way back in feb/march, I was still getting used to presenting code while recording. From now on, I'll create continuous content that will be easy to follow.
@dzaev36638 жыл бұрын
I see. Thank you!!
@firstinline1017 жыл бұрын
Really enjoyed this tutorial, thought it was great/interesting. Do large companies like Instagram or Facebook that have a lot of content in the form of photos/videos use similar NSURLCache methods?
@LetsBuildThatApp7 жыл бұрын
Photos are definitely cached using their own sophisticated library where items are evicted in a very efficient process. You gotta go to one of their talks to see what is really under the hood for their apps.
@firstinline1017 жыл бұрын
Ok, just wondering how translatable code is between smaller scale developers and the big boys! Thank you for your reply.
@david-tracy6 жыл бұрын
How can we find these talks?
@kylim75236 жыл бұрын
setSharedUrlCache in Swift 4.2?
@GameCrawl8 жыл бұрын
The library that you mentioned at the end is this github.com/rs/SDWebImage?
@daurenmuratov77 жыл бұрын
Awesome video! But, right now I'm having a problem. Every time collectionView bounces of the top, the first cell lags while going back to its position. Did Anyone have such problem?
@dany33706 жыл бұрын
11:38 swift 4 update: var imageCache = NSCache()
@abdallahsultan87978 жыл бұрын
hiii,, what if i want to change the image without change the link..is that possible? if not>> can i load set of images (i will replace it weekly) from firebase to my app ? if not>> any solution plz??
@laiqueahmed66137 жыл бұрын
Hi Brian thanx a lot for the video. But I have few questions 1. What is the size of default cache ? I saw in the above video 500KB image was fetching from network but 32KB image was in cache I guess it loaded faster. 2. Does AlamofireImage library takes care of caching ? 3. What is the maximum size I can define for cache ? you have set diskcapacity 500 * 1024 * 1024 ? How many MB's ?
@LetsBuildThatApp7 жыл бұрын
You should read the documentation on NSCache.
@david-tracy6 жыл бұрын
Ahmed did u find out?
@joshivanilla8 жыл бұрын
First of all thanks for the tutorial! I have a question: Currently I'm using Firebase to store and fetch image. But I am experiencing a problem where the image are in the wrong tableviewcell even though the image urls in each cell are correct. Google told me that it was because the image files are too large and images are being overwritten (something to deal with async as well) Are there any ways I can solve this?
@LetsBuildThatApp8 жыл бұрын
I run into this quite often, and ran into this while using firebase as well. I'll address it with my solution in a Firebase tutorial soon. Thanks for watching.
@joshivanilla8 жыл бұрын
+Lets Build That App Awesome! Subbed and thanks!
@OrkhanAlizade7 жыл бұрын
Thanks for he tutorial! But why there is a gap between this and previous video? In which part have you wrote that new code part???
@LetsBuildThatApp7 жыл бұрын
+Orkhan Alizade Happy hunting my child
@OrkhanAlizade7 жыл бұрын
Lets Build That App excuse me?
@Abdi-uy1kh7 жыл бұрын
haha that was random
@VictorAlves-ur7lp8 жыл бұрын
very nice explanations , but you do not use the storyboard?
@LetsBuildThatApp8 жыл бұрын
+Victor Alves I like typing everything in code, call me old school :)
@BrettCWX8 жыл бұрын
Oldschool
@kongli8868 жыл бұрын
Every time the application exits the cache is also cleared. How can I make the application not clear the cache once it exits? I don't want my app to load the images user once loaded every time the app is reopened. It's just like your web browser, your files are stored in a temporary folder until you delete the temporary files
@LetsBuildThatApp8 жыл бұрын
The cache will not help you if you're trying to keep a persistent state of your files. I suggest looking into CoreData to store your files using a binary format. Another method is to store the files directly into your app.
@eyalby1118 жыл бұрын
Hi, I don't think there is a good video tutorial on using AlamofireImage. if you can make one (using all his features and explaining them) it will be great!
@caelandailey64387 жыл бұрын
I have an issue. It'll set the cell's image to a previous cells image, and then switch it a fourth of a second later to the correct image. What am i doing wrong?
@LetsBuildThatApp7 жыл бұрын
+Caelan Dailey probably cell recycle affecting your app
@krovogadniy7 жыл бұрын
same problem. is there a solution?
@learning28868 жыл бұрын
Make a Udemy tutorial. Id buy it instantly. intermediate to advanced topics for the swift language is a soft market there and you're course would sell like fire. just sayin'... I spend 50$ a month on courses there.
@LetsBuildThatApp8 жыл бұрын
+Hunter Walker Thank you for the info regarding udemy. With the pricing changes and strictness of that platform, I'd have to continue monitoring before I step into that world.
@janardhanmupparaju29406 жыл бұрын
Hi, I am trying to load 100 or more images in tableview using SDWebImage but after downloaded all images getting Error Message from debugger: Terminated due to memory issue and after App is Crashing
@LetsBuildThatApp6 жыл бұрын
Cool, check the memory usage of your app
@janardhanmupparaju29406 жыл бұрын
thanks for your reply, now i identified problem is loading high resolution images in tableview
@LetsBuildThatApp6 жыл бұрын
Yeah you'll bust the memory limit real quick with high res images.
@leanprogrammer7 жыл бұрын
(Min 6)Is it possible that there's no need to cache anymore(as of October 2017)? Because my images do not reload. It is as if the network request is made once and the image is automatically cached. Anyone experiencing the same thing? Thanks in advance
@LetsBuildThatApp7 жыл бұрын
It all depends on how fast your internet connection is. Caching comes into play on 3g and much bigger apps.
@leanprogrammer7 жыл бұрын
Oh okay, thanks Brian
@nverabgaryan4 жыл бұрын
what about video preloading ?
@LetsBuildThatApp4 жыл бұрын
I suggest using HLS for video playback speed improvements.
@pavanteja19968 жыл бұрын
sir is it possible to link Facebook's news feed to this app
@LetsBuildThatApp8 жыл бұрын
Hello Pavan. Unfortunately, Facebook does not allow developers to replicate behavior similar to their iOS app.
@locacocavola8 жыл бұрын
What about twitter?
@roark098 жыл бұрын
Brian I'd like to ask if I can follow you on facebook or twitter.
@LetsBuildThatApp8 жыл бұрын
Yes you can follow me on twitter at @buildthatapp
@tapizquent6 жыл бұрын
Why not compress the image instead of bumping the cache up?
@LetsBuildThatApp6 жыл бұрын
Why not both?
@david-tracy6 жыл бұрын
would we then need to decompress the image after grabbing it from the cache and presenting it to the collection view?
@tapizquent6 жыл бұрын
CDMusicGroup no, why would you? Since you’re displaying the imagine on the screen, you don’t need it to be a huge image. Just like Instagram, images are very low res cause you don’t need a huge image for a phone
@david-tracy6 жыл бұрын
Tapizquent ok, sounded like you were saying to compress it into a file of a different (similar to how a .zip is compressed). I’m now seeing you’re referring to resizing and reducing the resolution of the image. Am I understanding you better now or are we still not on the same page
@tapizquent6 жыл бұрын
CDMusicGroup you are right. I was just referring to saving a smaller image.