File Download UIWebView to UITableView - ios

i managed to make a downloader with UIWebView. what i want to do is, when the download starts,
it should start in a different viewcontroller say tableView.
I have a tabbar controller in which last tab is downloads, i want my download to show there, including progress bar in tableViewCell.
If i pass the grabbed url to tableView, and start download from there, its not working.
Sorry if i am not making it clear.. cause i am confused myself.
Regards,
Malhaar

Try this one, quite good. Works background as well.

Related

How to update viewcontroller

I’ve put code in ViewWillAppear and I’ve tried ViewDidAppear but the app only updates when I close it and re-open it. Anyone have any idea on how to fix this? I’m using UserDefaults to update the app with. I’m new to swift and I’m using storyboard so could it have something to do with the hierarchy ? Any help on this would be really appreciated.
I am creating an app with a spinning wheel which updates with options put in a table view, ive added some pictures to help illustrate.
The table view updates fine but when I go back to the main screen nothing happens until I close the app and re-open it
I link my github in case you want to look at full code base.
https://github.com/jamesnjones/Just.Decide
ImageOfTable
ImageOfWheel
solved by including
spinningWheel.setNeedsDisplay()
spinningWheel.setNeedsLayout()
in view will appear

ScrollView and viewcontrollers

Here is context for my question, this is an optional read:
I have to develop an app for a
school project. At the end of the year some people I don't know will
listen to me presenting my app, and review my presentation and my app
(note that they will probably not be app developers, they are usually
IT professors) (note also that I'm allowed to ask for help to anybody,
and I can use internet since I do this mostly on my "free time")
So since October I'm developing my app, that takes a lot of time
because this is my first app. And here comes the issue:
My app is a giant Scroll view with 5 NavigationsControllers, each containing a ViewController. These ViewControllers sometimes have buttons that leads to an other ViewController. The problem is when I use these buttons, and another view controller is displayed, when I swipe right or left the ScrollView scrolls and another ViewController from the scrollView is displayed. I don't want this to happen because most of the time the ViewController displayed after the tap on a button is not meant to stay, it's generally a form to send data to the server.
As I think this is difficult to understand, you can download the project on Github
Is there a way for me to disable scroll on chosen ViewControllers? or should I change everything to avoid using a ScrollView?
Bonus question:
Is it a really really bad idea to make an app this way, or did I just miss something?
Thanks for your help!

Wallpapers app iOS

I'm just trying to create a simple app, that would work as a wallpaper app. But i need to get the images off interwebs. So I thought I would get a rss feed of images and and basically have a rss reader that only has images. But I thought. . . I need a preview for the images in the main viewcontroller, so I would use just a image view for that, but it needs to be able to let the user be able to click on the preview image and take the user to another viewcontroller that will have the full size image. So should I try to put the preview images in a button? and let the button take the user to another viewcontroller with a full size imageview and somehow have the image display their. Sorry if this is confusing, this is the only way i thought how to do this. If their is an easier way, please tell me. And when it comes to, when the user wants to download the image online, i can just hook up some outlets for some buttons on the viewcontroller and link them together with the image, and put some code for saving the image. Would that work?
Ok, so let me get this straight:
You want to create an app that retrieves images from the internet, displays them to the user, and when the user clicks on an image, he/she is presented with a fullscreen view of that image?
There are a number of options you can pick from. Here are just a few suggestions:
You can use the image as the image for a UIButton
You can make the UIImageView call a function when it's tapped (using either a UIGestureRecognizer, or just implementing the touchesBegan: method).
You can put an invisible UIButton over the UIImageView
When displaying the image, you add an UIImageView to the UIViewController and hook it up using an IBOutlet (unless you're creating the layout in code). Then in the code, you would convert the downloaded image (NSData) into a UIImage, and then display this in the UIImageView.
It seems as you're a beginning iOS Developer, and I respect that you're trying to learn by doing. However, I suggest that you start off with reading some introductory tutorials before you begin your first project. Otherwise you might waste a lot of time. Here's a very good guide on how to get started! Good luck :)

iOS Video Preview in DetailViewController

I need an advise regarding to video preview in DetailViewController. I have a tableView based app. I will have some content in my tableView and I want users to tap on the cell and go to the DetailViewController. So far, I was able to get users do this. I have the following storyboard at the moment. But it contains UIImageView in it.
IMAGE: http://cl.ly/image/0c3V121X0T0M
As you can see, I have thumbnailView and some label containing information and again UIImageView in detailViewController. My aim is to show a video on the DetailViewController instead of a UIImageView and some info related to that video. It would be better for me fetch the videos, so I don't need to push new updates every single time I make changes on the videos.
Do you happen to have an answer or any sources that can help me out with this? I have had a look at the resources available but couldn't come up with solid solution so far.
Please let me know if I should provide more regarding to my question.
You need to look at AVFoundation and AVPlayer.
Download Sample from here

Download and save image when app launch for later use (table view)

I'm new to objective c. What I am trying to do is that I have a tableView which downloads the images from the internet (using dataWithContentsOfURL) and a custom cell. When the cell is clicked it will push to another view where it shows that image again. Everything works perfectly fine. However, what I do is to re download the image using the exactly same method i.e.dataWithContentsOfURL in the detail view. It is very slow and wasting resource. I am thinking is there any better way to do it, such as downloading all the images I need, and save it in the app somewhere (does not have a clue how to do it), and pull it out later and push to another view).
Please correct me, if my concept is wrong.
Many thanks in advance.

Resources