A simple Ad Service for iOS to deliver custom ads to users on your application.
The Ad Service requires you to have an endpoint which returns a webpage containing the advertisment.
Copy the project's classes to your own project.
For interstellar Ad create an AdService object and pass in the main view of the View Controller.
let service = AdService(type: .Banner,adCacheTime: 30 , screenName: "Example Class", view: self.view, delegate: self)
For Banner Ad Create a UIView object and place it in your desired location. Create an AdService object passing in the ad banner view object.
let adBanner = UIView()
let service = AdService(type: .Banner, adCacheTime: 30 , screenName: "Example Class", view: adBanner, delegate: self)
Once the object is created simply call service.load() to load the advertisment from the server.
To show the ad once its loaded simply call the following function
func adDidLoad(_ service: AdService) {
service.showAd()
}
- SWIFT
- Hassan Abbasi
This project is licensed under the MIT License - see the LICENSE.md file for details
Inspired by Google Ad Service.