質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Xcode

Xcodeはソフトウェア開発のための、Appleの統合開発環境です。Mac OSXに付随するかたちで配布されています。

Swift

Swiftは、アップルのiOSおよびOS Xのためのプログラミング言語で、Objective-CやObjective-C++と共存することが意図されています

Q&A

解決済

1回答

2059閲覧

SwiftでのiOS向けWebViewアプリでの疑問

koutan

総合スコア10

Xcode

Xcodeはソフトウェア開発のための、Appleの統合開発環境です。Mac OSXに付随するかたちで配布されています。

Swift

Swiftは、アップルのiOSおよびOS Xのためのプログラミング言語で、Objective-CやObjective-C++と共存することが意図されています

0グッド

0クリップ

投稿2016/03/31 04:49

WebViewを表示でページを出すアプリを作っています。
最後の}の後ろに;をつけろという意味でしょうか?
Fix-it insert";"
と出てくるのでそれに従って;をつけたのですが

そこでたくさん10個ぐらい足したのですが
それがずっと出続けます。
更につけていくと入れすぎです?という意味?
Fix-it delete";"
と出てしまいます。
そして1個ずつ減らしていくと
Fix-it insert";"
の表示が出てきてしまいます。
さらに減らすと
Expecetd dellaration
というのが出てきました。

Swift

1 2// Scarチュートリアル for iOS 3// 4// Created by こーたん on 2016/03/31. 5// Copyright © 2016年 こーたん. All rights reserved. 6// 7 8import UIKit 9 10@UIApplicationMain 11class AppDelegate: UIResponder, UIApplicationDelegate { 12 13 var window: UIWindow? 14 15 16 func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 17 // Override point for customization after application launch. 18 return true 19 } 20 21 func applicationWillResignActive(application: UIApplication) { 22 // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 23 // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 24 } 25 26 func applicationDidEnterBackground(application: UIApplication) { 27 // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 } 30 31 func applicationWillEnterForeground(application: UIApplication) { 32 // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 33 } 34 35 func applicationDidBecomeActive(application: UIApplication) { 36 // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 37 } 38 39 func applicationWillTerminate(application: UIApplication) { 40 // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 41 } 42 43 44 class ViewController: UIViewController { 45 46 var webView: UIWebView? 47 48 var targetURL = "scarproject.github.io/operetion.html" 49 50 override func viewDidLoad() { 51 super.viewDidLoad() 52 53 54 // WebView表示 55 self.webView = self.createWebView() 56 57 // サブビュー 58 self.view.addSubview(self.webView!) 59 60 // リクエスト 61 let url = NSURL(string: targetURL) 62 let request = NSURLRequest(URL: url!) 63 64 // ページ読み込み 65 self.webView?.loadRequest(request) 66 } 67 68 69 func createWebView() -> UIWebView { 70 71 let _webView = UIWebView() 72 73 74 _webView.frame = self.view.bounds 75 76 return _webView 77 78 }

教えて下さい!
お願いします!m(_ _)m

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

最初の辺りのclass AppDelegate: UIResponder, UIApplicationDelegate {と、
真ん中辺りのclass ViewController: UIViewController {の、
2つの閉じ括弧がありませんので、最後に}を2つ追加して下さい。

swift

1(略) 2 } 3}

投稿2016/03/31 04:56

fuzzball

総合スコア16731

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

koutan

2016/03/31 04:59

そんな凡ミスだったとは!(笑) 成功しました!!!! ありがとうございます!!!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問