質問編集履歴

2

質問内容変更

2018/11/30 02:18

投稿

po_tato
po_tato

スコア97

test CHANGED
@@ -1 +1 @@
1
- ライブラリMessageKitについて
1
+ storyboardを使用しないライブラリのレイアウトについて
test CHANGED
@@ -6,88 +6,38 @@
6
6
 
7
7
 
8
8
 
9
- の際Xcode"BuildSettings->Swift Language Version"は
9
+ ちらはMainstoryboardのviewcontrollerにカスタムクラスを設定するだけで、
10
10
 
11
+ 全画面表示のMessageKitのチャット画面が表示されるのですが、
12
+
11
- "swift4.2"に設定されていますが、こちらを"swift3"に設定変更しても動作すようにしたいで
13
+ ソースコードを見るとCollectionViewで作成されているたいでした
12
14
 
13
15
 
14
16
 
15
- 変更するとエラーが表示されるのすがエラー検索しても解決策がいまいちわらず
17
+ 私は画面幅いっぱいの表示ではなくサイズ指定して表示させたったので、
16
-
17
- どうすればよいのか分かりません。
18
18
 
19
19
 
20
20
 
21
21
  ```
22
22
 
23
- /Users/username/Desktop/TestChat/TestChat/ViewController.swift:143:1: Type 'ViewController' cannot conform to protocol 'MessagesDisplayDelegate' (compiled with Swift 4.1.50) because it has requirements that could not be loaded in Swift 3.4.1
23
+ messagesCollectionView.frame = CGRect(x: 0, y: 0, width: 300, height: 500)
24
24
 
25
25
  ```
26
26
 
27
+ このように記述したり、
27
28
 
29
+ storyboard上で小さめのView(smallView)を配置し、アウトレット接続後、
28
30
 
29
31
  ```
30
32
 
31
- Type 'String' has no member 'font'; did you mean 'count'?
33
+ smallView.addSubview(messagesCollectionView)
32
34
 
33
35
  ```
34
36
 
37
+ このようにしましたがレイアウトは変更されませんでした。
35
38
 
36
39
 
37
40
 
41
+ この方法は間違っているでしょうか?
38
42
 
39
- podfile
40
-
41
- ```
42
-
43
- # Uncomment the next line to define a global platform for your project
44
-
45
- platform :ios, '9.0'
46
-
47
-
48
-
49
- target 'TestChat' do
50
-
51
- # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
52
-
53
- use_frameworks!
54
-
55
- pod 'Firebase/Database'
56
-
57
- pod 'MessageKit','~>1.0.0'
58
-
59
-
60
-
61
- post_install do |installer|
62
-
63
- installer.pods_project.targets.each do |target|
64
-
65
- if target.name == 'MessageKit'
66
-
67
- target.build_configurations.each do |config|
68
-
69
- config.build_settings['SWIFT_VERSION'] = '4.0'
70
-
71
- end
72
-
73
- end
74
-
75
- end
76
-
77
- end
78
-
79
- end
80
-
81
-
82
-
83
- ```
84
-
85
-
86
-
87
- 情報提供して頂けると幸いでございます。
43
+ 他に方法がございましたらご教示お願い致します。
88
-
89
-
90
-
91
- 動作環境
92
-
93
- Version 10.1 (10B61)

1

追記

2018/11/30 02:18

投稿

po_tato
po_tato

スコア97

test CHANGED
File without changes
test CHANGED
@@ -34,6 +34,56 @@
34
34
 
35
35
 
36
36
 
37
+
38
+
39
+ podfile
40
+
41
+ ```
42
+
43
+ # Uncomment the next line to define a global platform for your project
44
+
45
+ platform :ios, '9.0'
46
+
47
+
48
+
49
+ target 'TestChat' do
50
+
51
+ # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
52
+
53
+ use_frameworks!
54
+
55
+ pod 'Firebase/Database'
56
+
57
+ pod 'MessageKit','~>1.0.0'
58
+
59
+
60
+
61
+ post_install do |installer|
62
+
63
+ installer.pods_project.targets.each do |target|
64
+
65
+ if target.name == 'MessageKit'
66
+
67
+ target.build_configurations.each do |config|
68
+
69
+ config.build_settings['SWIFT_VERSION'] = '4.0'
70
+
71
+ end
72
+
73
+ end
74
+
75
+ end
76
+
77
+ end
78
+
79
+ end
80
+
81
+
82
+
83
+ ```
84
+
85
+
86
+
37
87
  情報提供して頂けると幸いでございます。
38
88
 
39
89