Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Commit

Permalink
v8.2.0 (#156)
Browse files Browse the repository at this point in the history
* Change String to Number for nendSpotID.(Swift) (#140)

* Change String to Number for nendSpotID. (#139)

* Add Banner UI test. (#141)

* Replaced the use of Deprecated properties. (#143)

* Replace '.delegate' with '.loadingDelegate' and '.clickDelegate'.

* [Objective-C]Replace '.delegate' with '.loadingDelegate' and '.clickDelegate'.

* Cutting off information button on full board ad (#146)

* Swift: Add container view into safe area

* Objective-C: Add container view into safe area

* Updated minimum deployment target to iOS 11.0. (#150)

* Update Podfile.

* Fixed warning : 'bottomLayoutGuide' is deprecated: first deprecated in iOS 11.0 - Use view.safeAreaLayoutGuide.bottomAnchor instead of bottomLayoutGuide.topAnchor

* Update README.

* Fixed crash on banner display.

* Remove #available(iOS 11.0, *) (#154)

---------

Co-authored-by: fan-n-kunimoto <102932230+fan-n-kunimoto@users.noreply.github.com>
Co-authored-by: fan-n-kunimoto <n_kunimoto@fancs.com>
Co-authored-by: fan-mi-baba <101761162+fan-mi-baba@users.noreply.github.com>
Co-authored-by: fan-t-kinami <t_kinami@fancs.com>
  • Loading branch information
5 people committed Sep 14, 2023
1 parent 0ea4cdc commit 54e3656
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 192 deletions.
94 changes: 30 additions & 64 deletions Swift_Example/Banner/BannerView300x100Controller.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,70 +110,36 @@ class BannerView300x100Controller: UIViewController, NADViewDelegate {
self.view.addSubview(nadViewManually)

// 画面下部に広告を表示させる場合
if #available(iOS 11.0, *) {
view.addConstraints([
NSLayoutConstraint.init(item: adView!,
attribute: .width,
relatedBy: .equal,
toItem: nil,
attribute: .width,
multiplier: 1,
constant: adView.frame.size.width),
NSLayoutConstraint.init(item: adView!,
attribute: .height,
relatedBy: .equal,
toItem: nil,
attribute: .height,
multiplier: 1,
constant: adView.frame.size.height),
NSLayoutConstraint.init(item: adView!,
attribute: .centerX,
relatedBy: .equal,
toItem: view,
attribute: .centerX,
multiplier: 1,
constant: 0),
NSLayoutConstraint.init(item: adView!,
attribute: .bottom,
relatedBy: .equal,
toItem: view.safeAreaLayoutGuide,
attribute: .bottom,
multiplier: 1,
constant: 0),
])
} else {
// Fallback on earlier versions
view.addConstraints([
NSLayoutConstraint.init(item: adView!,
attribute: .width,
relatedBy: .equal,
toItem: nil,
attribute: .width,
multiplier: 1,
constant: adView.frame.size.width),
NSLayoutConstraint.init(item: adView!,
attribute: .height,
relatedBy: .equal,
toItem: nil,
attribute: .height,
multiplier: 1,
constant: adView.frame.size.height),
NSLayoutConstraint.init(item: adView!,
attribute: .centerX,
relatedBy: .equal,
toItem: view,
attribute: .centerX,
multiplier: 1,
constant: 0),
NSLayoutConstraint.init(item: adView!,
attribute: .bottom,
relatedBy: .equal,
toItem: bottomLayoutGuide,
attribute: .top,
multiplier: 1,
constant: 0),
])
}
view.addConstraints([
NSLayoutConstraint.init(item: adView!,
attribute: .width,
relatedBy: .equal,
toItem: nil,
attribute: .width,
multiplier: 1,
constant: adView.frame.size.width),
NSLayoutConstraint.init(item: adView!,
attribute: .height,
relatedBy: .equal,
toItem: nil,
attribute: .height,
multiplier: 1,
constant: adView.frame.size.height),
NSLayoutConstraint.init(item: adView!,
attribute: .centerX,
relatedBy: .equal,
toItem: view,
attribute: .centerX,
multiplier: 1,
constant: 0),
NSLayoutConstraint.init(item: adView!,
attribute: .bottom,
relatedBy: .equal,
toItem: view.safeAreaLayoutGuide,
attribute: .bottom,
multiplier: 1,
constant: 0),
])
} else {

}
Expand Down
94 changes: 30 additions & 64 deletions Swift_Example/Banner/BannerView320x100Controller.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,70 +113,36 @@ class BannerView320x100Controller: UIViewController, NADViewDelegate {
self.view.addSubview(nadViewManually)

// 画面下部に広告を表示させる場合
if #available(iOS 11.0, *) {
view.addConstraints([
NSLayoutConstraint.init(item: adView!,
attribute: .width,
relatedBy: .equal,
toItem: nil,
attribute: .width,
multiplier: 1,
constant: adView.frame.size.width),
NSLayoutConstraint.init(item: adView!,
attribute: .height,
relatedBy: .equal,
toItem: nil,
attribute: .height,
multiplier: 1,
constant: adView.frame.size.height),
NSLayoutConstraint.init(item: adView!,
attribute: .centerX,
relatedBy: .equal,
toItem: view,
attribute: .centerX,
multiplier: 1,
constant: 0),
NSLayoutConstraint.init(item: adView!,
attribute: .bottom,
relatedBy: .equal,
toItem: view.safeAreaLayoutGuide,
attribute: .bottom,
multiplier: 1,
constant: 0),
])
} else {
// Fallback on earlier versions
view.addConstraints([
NSLayoutConstraint.init(item: adView!,
attribute: .width,
relatedBy: .equal,
toItem: nil,
attribute: .width,
multiplier: 1,
constant: adView.frame.size.width),
NSLayoutConstraint.init(item: adView!,
attribute: .height,
relatedBy: .equal,
toItem: nil,
attribute: .height,
multiplier: 1,
constant: adView.frame.size.height),
NSLayoutConstraint.init(item: adView!,
attribute: .centerX,
relatedBy: .equal,
toItem: view,
attribute: .centerX,
multiplier: 1,
constant: 0),
NSLayoutConstraint.init(item: adView!,
attribute: .bottom,
relatedBy: .equal,
toItem: bottomLayoutGuide,
attribute: .top,
multiplier: 1,
constant: 0),
])
}
view.addConstraints([
NSLayoutConstraint.init(item: adView!,
attribute: .width,
relatedBy: .equal,
toItem: nil,
attribute: .width,
multiplier: 1,
constant: adView.frame.size.width),
NSLayoutConstraint.init(item: adView!,
attribute: .height,
relatedBy: .equal,
toItem: nil,
attribute: .height,
multiplier: 1,
constant: adView.frame.size.height),
NSLayoutConstraint.init(item: adView!,
attribute: .centerX,
relatedBy: .equal,
toItem: view,
attribute: .centerX,
multiplier: 1,
constant: 0),
NSLayoutConstraint.init(item: adView!,
attribute: .bottom,
relatedBy: .equal,
toItem: view.safeAreaLayoutGuide,
attribute: .bottom,
multiplier: 1,
constant: 0),
])
} else {

}
Expand Down
95 changes: 31 additions & 64 deletions Swift_Example/Banner/BannerView320x50Controller.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,70 +128,37 @@ class BannerView320x50Controller: UIViewController, NADViewDelegate {
self.view.addSubview(nadViewManually)

// 画面下部に広告を表示させる場合
if #available(iOS 11.0, *) {
view.addConstraints([
NSLayoutConstraint.init(item: adView!,
attribute: .width,
relatedBy: .equal,
toItem: nil,
attribute: .width,
multiplier: 1,
constant: adView.frame.size.width),
NSLayoutConstraint.init(item: adView!,
attribute: .height,
relatedBy: .equal,
toItem: nil,
attribute: .height,
multiplier: 1,
constant: adView.frame.size.height),
NSLayoutConstraint.init(item: adView!,
attribute: .centerX,
relatedBy: .equal,
toItem: view,
attribute: .centerX,
multiplier: 1,
constant: 0),
NSLayoutConstraint.init(item: adView!,
attribute: .bottom,
relatedBy: .equal,
toItem: view.safeAreaLayoutGuide,
attribute: .bottom,
multiplier: 1,
constant: 0),
])
} else {
// Fallback on earlier versions
view.addConstraints([
NSLayoutConstraint.init(item: adView!,
attribute: .width,
relatedBy: .equal,
toItem: nil,
attribute: .width,
multiplier: 1,
constant: adView.frame.size.width),
NSLayoutConstraint.init(item: adView!,
attribute: .height,
relatedBy: .equal,
toItem: nil,
attribute: .height,
multiplier: 1,
constant: adView.frame.size.height),
NSLayoutConstraint.init(item: adView!,
attribute: .centerX,
relatedBy: .equal,
toItem: view,
attribute: .centerX,
multiplier: 1,
constant: 0),
NSLayoutConstraint.init(item: adView!,
attribute: .bottom,
relatedBy: .equal,
toItem: bottomLayoutGuide,
attribute: .top,
multiplier: 1,
constant: 0),
])
}
view.addConstraints([
NSLayoutConstraint.init(item: adView!,
attribute: .width,
relatedBy: .equal,
toItem: nil,
attribute: .width,
multiplier: 1,
constant: adView.frame.size.width),
NSLayoutConstraint.init(item: adView!,
attribute: .height,
relatedBy: .equal,
toItem: nil,
attribute: .height,
multiplier: 1,
constant: adView.frame.size.height),
NSLayoutConstraint.init(item: adView!,
attribute: .centerX,
relatedBy: .equal,
toItem: view,
attribute: .centerX,
multiplier: 1,
constant: 0),
NSLayoutConstraint.init(item: adView!,
attribute: .bottom,
relatedBy: .equal,
toItem: view.safeAreaLayoutGuide,
attribute: .bottom,
multiplier: 1,
constant: 0),
])

} else {

}
Expand Down

0 comments on commit 54e3656

Please sign in to comment.