質問編集履歴
2
質問内容変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ライブラリ
|
1
|
+
storyboardを使用しないライブラリのレイアウトについて
|
test
CHANGED
@@ -6,88 +6,38 @@
|
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
-
こ
|
9
|
+
こちらはMainstoryboardのviewcontrollerにカスタムクラスを設定するだけで、
|
10
10
|
|
11
|
+
全画面表示のMessageKitのチャット画面が表示されるのですが、
|
12
|
+
|
11
|
-
|
13
|
+
ソースコードを見るとCollectionViewで作成されているみたいでした。
|
12
14
|
|
13
15
|
|
14
16
|
|
15
|
-
|
17
|
+
私は画面幅いっぱいの表示ではなく、サイズを指定して表示させたかったので、
|
16
|
-
|
17
|
-
どうすればよいのか分かりません。
|
18
18
|
|
19
19
|
|
20
20
|
|
21
21
|
```
|
22
22
|
|
23
|
-
|
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
|
-
|
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
追記
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
|
|