whats the seed for spacefiller pattern in conway's game of life - conways-game-of-life

Can anybody tell me what is the seed for spacefiller pattern in Conway's game of life ? I am planning to include some interesting patterns for user in my game.
Thanks much,

From Golly, a really nice Sourceforge Game-of-Life project with a huge number of seeds:
███ ███
█ █ █ █
████ █ █ ████
█ █ █ █ █ █
█ █ █ █ █ █
█ █ ██ █ █ ██ █ █
█ █ ███ ███ █ █
█ █ █ █ █ █
█ █ ███████ █ █
█ █ ██ █ ██ █ █ ██ █ ██ █ █
█ █ ██ ███████████ ██ █ █
█ █ ██ ██ █ █
████ ███████████████████ ████
█ █ █ █
███████████
█ █
█████████
█
███ ███
█ █
███ ███
███ ███
█ ██ ██ █
███ ███
█ █

I believe you are referring to the glider pattern?
One of the frames looks like;
010
001
111
Edit:
Try
http://www.argentum.freeserve.co.uk/lex_s.htm#spacefiller

I believe missKK is looking for a Conway's Game of Life pattern that will, if placed in empty space, fill the space with an agar. Although new Life patterns are discovered all the time, as of today the smallest known pattern is Tim Coe's "Max", a 187-cell pattern which fits in a 27x27 bounding box:
#N Max
#O Tim Coe
#C A spacefiller that fills space with zebra stripes.
#C www.conwaylife.com/wiki/index.php?title=Max
x = 27, y = 27, rule = s23/b3
18bo8b$17b3o7b$12b3o4b2o6b$11bo2b3o2bob2o4b$10bo3bobo2bobo5b$10bo4bobo
bobob2o2b$12bo4bobo3b2o2b$4o5bobo4bo3bob3o2b$o3b2obob3ob2o9b2ob$o5b2o
5bo13b$bo2b2obo2bo2bob2o10b$7bobobobobobo5b4o$bo2b2obo2bo2bo2b2obob2o
3bo$o5b2o3bobobo3b2o5bo$o3b2obob2o2bo2bo2bob2o2bob$4o5bobobobobobo7b$
10b2obo2bo2bob2o2bob$13bo5b2o5bo$b2o9b2ob3obob2o3bo$2b3obo3bo4bobo5b4o
$2b2o3bobo4bo12b$2b2obobobobo4bo10b$5bobo2bobo3bo10b$4b2obo2b3o2bo11b$
6b2o4b3o12b$7b3o17b$8bo!
The Lifewiki website has more information on this pattern and other known spacefillers.

Related

Doom Emacs Custom ASCII Splash SCreen - Left indent is too great

For the record, I'm just gettin' my feet wet with Emacs, Doom, and I've never written a line of Lisp before (I'm assuming this code is Lisp?). This is a good ol' learning moment for me, so feel free to spare me no detail in the response (or just solve my problems, totally fine either way).
I snagged this script from the interweb, it 'almost' works perfect. There's a big ol' indent on the lefthand side that's pushing my ASCII too far to the right. What's causing that to happen, and how can I get it nice and centered?
Image 1: Screenshot: config.el custom function
Image 2: Indented ASCII splash screen
Code below, sorry for the mess. It's also in the screenshot.
(defun custom_banner ()
(let* (
(banner
'(
" ▄████████ ▄████████ ▄████████ ▄████████ ▄████████ ▄███████▄ ▄████████ ████████▄ ▄████████ ▄████████ "
" ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ▀███ ███ ███ ███ ███ "
" ███ ███ ███ █▀ ███ █▀ ███ ███ ███ █▀ ███ ███ ███ ███ ███ ███ ███ █▀ ███ █▀ "
" ███ ███ ███ ▄███▄▄▄ ███ ███ ███ ███ ███ ███ ███ ███ ███ ▄███▄▄▄ ███ "
" ▀███████████ ███ ▀▀███▀▀▀ ▀███████████ ▀███████████ ▀█████████▀ ▀███████████ ███ ███ ▀▀███▀▀▀ ▀███████████ "
" ███ ███ ███ █▄ ███ █▄ ███ ███ ███ ███ ███ ███ ███ ███ ███ █▄ ███ "
" ███ ███ ███ ███ ███ ███ ███ ███ ▄█ ███ ███ ███ ███ ███ ▄███ ███ ███ ▄█ ███ "
" ███ █▀ ████████▀ ██████████ ███ █▀ ▄████████▀ ▄████▀ ███ █▀ ████████▀ ██████████ ▄████████▀ "
" "
" ▄████████ ▄▄▄▄███▄▄▄▄ ███ █▄ ███▄▄▄▄ ▄█ ▄█▄ ▄█ █▄ ▄████████ ▄███████▄ ▄████████ ▄████████ ▄████████ "
" ███ ███ ▄██▀▀▀███▀▀▀██▄ ███ ███ ███▀▀▀██▄ ███ ▄███▀ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ "
" ███ ███ ███ ███ ███ ███ ███ ███ ███ ███▐██▀ ███ ███ ███ █▀ ███ ███ ███ █▀ ███ ███ ███ ███ "
" ███ ███ ███ ███ ███ ███ ███ ███ ███ ▄█████▀ ▄███▄▄▄▄███▄▄ ▄███▄▄▄ ███ ███ ▄███▄▄▄ ▄███▄▄▄▄██▀ ███ ███ "
"▀███████████ ███ ███ ███ ███ ███ ███ ███ ▀▀█████▄ ▀▀███▀▀▀▀███▀ ▀▀███▀▀▀ ▀█████████▀ ▀▀███▀▀▀ ▀▀███▀▀▀▀▀ ▀███████████ "
" ███ ███ ███ ███ ███ ███ ███ ███ ███ ███▐██▄ ███ ███ ███ █▄ ███ ███ █▄ ▀███████████ ███ ███ "
" ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ▀███▄ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ "
" ███ █▀ ▀█ ███ █▀ ████████▀ ▀█ █▀ ███ ▀█▀ ███ █▀ ██████████ ▄████▀ ██████████ ███ ███ ███ █▀ "
" ▀ ███ ███ "))
(longest-line (apply #'max (mapcar #'length banner))))
(put-text-property
(point)
(dolist (line banner (point))
(insert (+doom-dashboard--center
+doom-dashboard--width
(concat line (make-string (max 0 (- longest-line (length line))) 32)))
"\n"))
'face 'doom-dashboard-banner))
)
(setq +doom-dashboard-ascii-banner-fn #'custom_banner)
If I had to guess, that function is not designed to work with banners as wide as yours. Note yours is a lot wider than the default and the examples given at the site you link in the comments.
Observe that +doom-dashboard--width is defined as 80, suggesting to me that you're not supposed to use a splash screen any wider than that. You could try just removing the call to +doom-dashboard--width and all the other centering logic, since your text is already pre-centered. Maybe it works, but no guarantees.
...
(dolist (line banner (point))
(insert line "\n"))
...

How to shorten tab bar config codes?

I have a configuration code for UITabBarItem but it is too much. Is there any way to shorten this code? I couldn't find any extension for that.
let selectedColor = #colorLiteral(red: 0.3921568627, green: 0.168627451, blue: 0.4509803922, alpha: 1)
let deselectedColor = #colorLiteral(red: 0.5843137255, green: 0.6470588235, blue: 0.6509803922, alpha: 1)
let selectedFont = UIFont(name: "SFProDisplay-Bold", size: 10)!
let deselectedFont = UIFont(name: "SFProDisplay-Regular", size: 10)!
UITabBarItem.appearance().setTitleTextAttributes([NSAttributedString.Key.font: deselectedFont, NSAttributedString.Key.foregroundColor : deselectedColor], for: .normal)
UITabBarItem.appearance().setTitleTextAttributes([NSAttributedString.Key.font: selectedFont, NSAttributedString.Key.foregroundColor : selectedColor], for: .selected)
If there are any extensions for UITabBar and UITabBarItems, can you please share them with me?
One thing you can do is to get rid of all NSAttributedString.Keys, because swift can infer that itself.
UITabBarItem.appearance().setTitleTextAttributes([.font: deselectedFont, .foregroundColor : deselectedColor], for: .normal)

Calculate the size of text for draw in context(Core Graphics)?

I need to know the size of my text that I am going to draw in context. How we can find the size of created text inside context?
What I should put for sizeOfText?
this is my code:
let text = "Some test"
let locationOfText: CGPoint = .zero
let fontOFText: CGFloat = 30
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.alignment = .left
let attrib: [NSAttributedString.Key: Any] = [
.font: UIFont.boldSystemFont(ofSize: fontOFText),
.paragraphStyle: paragraphStyle]
let sizeOfComponent = labelSimulator(withThisFont: UIFont.boldSystemFont(ofSize: fontOFText), withThisText: text)
let sizeOfText = CGSize(width: sizeOfComponent.width, height: sizeOfComponent.height)
text.draw(in: CGRect(origin: locationOfText, size: sizeOfText), withAttributes: Attrib)
This part is my way to find the Size of text, do you know better way, hit me!
//█ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █
func labelSimulator(withThisFont: UIFont, withThisText: String) -> CGSize
{
//▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲
let simulator = UILabel()
simulator.font = withThisFont
simulator.text = withThisText
//▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
//▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲
return simulator.sizeThatFits(CGSize(width: CGFloat.greatestFiniteMagnitude, height: CGFloat.greatestFiniteMagnitude))
//▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
}
//█ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █
I have already shown to you how to calculate the height of your text on your last question. You just need to add a margin to it and move on. The width you choose will determine the final height:
let pdfFormat = UIGraphicsPDFRendererFormat()
let metaData: [CFString : Any] = [
kCGPDFContextTitle: "Hello, World!",
kCGPDFContextAuthor: "Omid",
kCGPDFContextCreator: "PDF Creator"]
pdfFormat.documentInfo = metaData as [String: Any]
// your PDF page size
let size: CGSize = .init(width: 8.5 * 72.0, height: 11 * 72.0)
let bounds: CGRect = .init(origin: .zero, size: size)
let pdfRenderer = UIGraphicsPDFRenderer(bounds: bounds, format: pdfFormat)
let documentDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!
let data = pdfRenderer.pdfData { (context) in
context.beginPage()
let text = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
let fontOFText: CGFloat = 30
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.alignment = .left
let attrib: [NSAttributedString.Key: Any] = [
.font: UIFont.boldSystemFont(ofSize: fontOFText),
.paragraphStyle: paragraphStyle]
let margin: CGFloat = 20
let attributedText = NSAttributedString(string: text, attributes: attrib)
let textCanvas = bounds.insetBy(dx: margin, dy: 0).size
let textSize = attributedText.boundingRect(with: textCanvas,
options: [.usesFontLeading, .usesLineFragmentOrigin],
context: nil).size
let rect = CGRect(origin: .init(x: margin/2, y: 0), size: textSize)
text.draw(in: rect, withAttributes: attrib)
let nextTextYPosition = rect.origin.y + rect.size.height
print("nextTextYPosition", nextTextYPosition)
"NEXT TEXT".draw(in: .init(origin: .init(x: margin/2, y: nextTextYPosition), size: CGSize.init(width: 200, height: 200)), withAttributes: attrib)
}
let fileURL = documentDirectory.appendingPathComponent("test.pdf")
try data.write(to: fileURL)
For the specific situation you've described, the size you generally want is CGSize(width: .greatestFiniteMagnitude, height: .greatestFiniteMagnitude). Depending on the context you're drawing into, you may want to constrain the height. If you want it to wrap, then you can constrain the width.
The in: parameter here is a constraining box. It's the largest box allowed. It doesn't have to tightly match the text.
If you need the actual size (in order to put an outline around it for example), you can compute that using .boundingRect(with:options:attributes:context:).
(Noting your edit, you seem to have the right idea. You just don't need a label. You can ask the string directly.)
For example, based on your code, there's no need for labelSimulator:
let sizeOfText = CGSize(width: CGFloat.greatestFiniteMagnitude, height: .greatestFiniteMagnitude)
text.draw(in: CGRect(origin: locationOfText, size: sizeOfText), withAttributes: attrib)

redraw a custom UIVIEW when device orientation changed SWIFT 5

I wrote the code down for new UIVIEW but after device rotation the draw of UIVIEW do not get cleaned up for new situation! And stay visible for user! look at picture. how we can fix the problem?
import UIKit
class ViewController: UIViewController
{
override func viewDidLoad()
{
super.viewDidLoad()
}
override func viewDidLayoutSubviews()
{
var drawView = UIView()
let drawViewOffsetFromTop = max( 25 , Int( view.safeAreaInsets.top ) )
let drawViewOffsetFromBottom = max( 25 , Int( view.safeAreaInsets.bottom ) )
let drawViewWidth = Int( view.frame.size.width ) - 2*25
let drawViewHeight = Int( view.frame.size.height) - drawViewOffsetFromTop - drawViewOffsetFromBottom
drawView = UIView(frame: CGRect(x: 25 , y: drawViewOffsetFromTop, width: drawViewWidth , height: drawViewHeight ))
drawView.backgroundColor = UIColor.gray
drawView.layer.cornerRadius = 15
view.addSubview(drawView)
}
}
You can use Autolayout to make things simple.
Remove override viewDidLayoutSubviews completely.
Use the following in viewDidLoad
override func viewDidLoad()
{
super.viewDidLoad()
var drawView = UIView()
//Setup Constraints for `drawView`
drawView.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
drawView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 25),
drawView.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -25),
drawView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 15),
drawView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -15)
])
}
Edit: Solution without Autolayout
The issue is that your drawView is added multiple times in the view hierarchy! You can just add it once and only change the frame.
class ViewController: UIViewController {
var drawView = UIView()
override func viewDidLoad()
{
super.viewDidLoad()
view.addSubview(drawView)
drawView.backgroundColor = UIColor.gray
drawView.layer.cornerRadius = 15
}
override func viewDidLayoutSubviews()
{
let drawViewOffsetFromTop = max( 25 , Int( view.safeAreaInsets.top ) )
let drawViewOffsetFromBottom = max( 25 , Int( view.safeAreaInsets.bottom ) )
let drawViewWidth = Int( view.frame.size.width ) - 2*25
let drawViewHeight = Int( view.frame.size.height) - drawViewOffsetFromTop - drawViewOffsetFromBottom
drawView.frame = CGRect(x: 25 , y: drawViewOffsetFromTop, width: drawViewWidth , height: drawViewHeight )
}
}
First of all, you should not put creating UIView code in viewDidLayoutSubviews, create and add it in viewDidLoad instead. You can put view frame update code in viewDidLayoutSubviews.
The problem is you are adding drawView multiple times without removing existing ones. In addition you are initializing drawView multiple times in different lines unnecessarily.
To fix the problem, create drawView in your controller, add it to superview in viewDidLoad and edit your viewDidLayoutSubviews just like below:
class ViewController: UIViewController {
private var drawView : UIView = UIView()
override func viewDidLoad() {
super.viewDidLoad()
view.addSubview(drawView)
}
override func viewDidLayoutSubviews() {
let drawViewOffsetFromTop = max(25 , Int(view.safeAreaInsets.top))
let drawViewOffsetFromBottom = max(25 , Int(view.safeAreaInsets.bottom))
let drawViewWidth = Int(view.frame.size.width ) - 2*25
let drawViewHeight = Int(view.frame.size.height) - drawViewOffsetFromTop - drawViewOffsetFromBottom
drawView.frame = CGRect(x: 25, y: drawViewOffsetFromTop, width: drawViewWidth, height: drawViewHeight)
drawView.backgroundColor = UIColor.gray
drawView.layer.cornerRadius = 15
}
}
//▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲
var drawView = UIView()
//▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
//█ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █
override func viewDidLoad()
{
super.viewDidLoad()
view.backgroundColor = UIColor.gray
}
//█ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █
//█ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █
override func viewDidLayoutSubviews()
{
//▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲
let backView = UIView(frame: CGRect(x: 0 , y: 0, width: view.frame.size.width , height: view.frame.size.height ))
backView.backgroundColor = UIColor.gray
view.addSubview(backView)
//▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
//▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲
let drawViewOffsetFromTop = max( 25 , Int( view.safeAreaInsets.top ) )
let drawViewOffsetFromBottom = max( 25 , Int( view.safeAreaInsets.bottom ) )
let drawViewOffsetFromRight = max( 25 , Int( view.safeAreaInsets.right ) )
let drawViewOffsetFromLeft = max( 25 , Int( view.safeAreaInsets.left ) )
//▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
//▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲
let drawViewWidth = Int( view.frame.size.width ) - drawViewOffsetFromRight - drawViewOffsetFromLeft
let drawViewHeight = Int( view.frame.size.height) - drawViewOffsetFromTop - drawViewOffsetFromBottom
//▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
//▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲
drawView = UIView(frame: CGRect(x: drawViewOffsetFromRight , y: drawViewOffsetFromTop, width: drawViewWidth , height: drawViewHeight ))
//▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
//▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲
drawView.backgroundColor = UIColor.systemTeal
drawView.layer.cornerRadius = 12
drawView.layer.borderWidth = 5
drawView.layer.borderColor = UIColor.black.cgColor
view.addSubview(drawView)
//▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
}
//█ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █

Admob both test ads and real ads are not showing

My app is not receiving neither of the Test ads or Real ads from Admob in both simulator and real device. But if I change the bundle id of the app, it receives both type of ads just fine. The issue is coming up after I switched the app to new AdMob account. I have updated the publisher id in Info.plist file and also the ad units that are being used to that of new account.
The error received is:
Error Domain=com.google.admob Code=1 "Request Error: No ad to show." UserInfo={NSLocalizedDescription=Request Error: No ad to show.}
I have implemented the Admob following guides at
https://developers.google.com/admob/ios/quick-start
https://developers.google.com/admob/ios/banner
var bannerView: GADBannerView!
override func viewDidLoad() {
...
bannerView = GADBannerView(adSize: kGADAdSizeBanner)
bannerView.adUnitID = "ca-app-pub-3940256099942544/2934735716"
bannerView.rootViewController = self
bannerView.delegate = self
bannerView.load(GADRequest())
addBannerViewToView(bannerView)
}
func addBannerViewToView(_ bannerView: GADBannerView) {
bannerView.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(bannerView)
view.addConstraints(
[NSLayoutConstraint(item: bannerView,
attribute: .bottom,
relatedBy: .equal,
toItem: bottomLayoutGuide,
attribute: .top,
multiplier: 1,
constant: 0),
NSLayoutConstraint(item: bannerView,
attribute: .centerX,
relatedBy: .equal,
toItem: view,
attribute: .centerX,
multiplier: 1,
constant: 0)
])
}
...
func adView(_ bannerView: GADBannerView,
didFailToReceiveAdWithError error: GADRequestError) {
print(error)
}