小编San*_*0rd的帖子

删除BottomNavigationView标签

谷歌发布了支持BottomNavigationView的新支持库v25

在此输入图像描述

有没有办法删除商品标签?

android android-support-library androiddesignsupport bottomnavigationview

56
推荐指数
6
解决办法
4万
查看次数

如何使用Swift 3中的Pods使用Swift 4.0构建xcode 9项目?

我想我的iOS App的主模块编译Swift 4.0,而CocoaPods模块编译swift 3.

PS:使用Xcode 9 beta 2.

ios cocoapods swift3 swift4 xcode9-beta

19
推荐指数
4
解决办法
7159
查看次数

使用AppCompat BottomSheets的NullPointerExeption

LinearLayout bottomSheetViewgroup = (LinearLayout) findViewById(R.id.bottomSheet);

bottomSheetBehavior = BottomSheetBehavior.from(bottomSheetViewgroup);

bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED); //this line
Run Code Online (Sandbox Code Playgroud)

我在我的activity的onCreate()方法中有这个代码,当执行最后一行时,我得到了下面的NPE异常:

引发者:java.lang.NullPointerException:尝试在android.support.design.widget.BottomSheetBehavior.setState上的空对象引用上调用虚方法'java.lang.Object java.lang.ref.WeakReference.get()'( BottomSheetBehavior.java:440)

android nullpointerexception android-appcompat material-design

15
推荐指数
2
解决办法
7189
查看次数

如何在swift 4中更改NavBar标题文本颜色?

在swift 3开发时,我习惯写:

UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName: UIColor.orange]
Run Code Online (Sandbox Code Playgroud)

将它放在AppDelegate中会将所有UINavbars的标题颜色更改为橙​​色.

现在我想对Swift 4和iOS 11做同样的事情.

uinavigationbar uikit ios swift swift4

5
推荐指数
3
解决办法
1万
查看次数

类型“ GKEntity”的值没有成员“ componentForClass”。为什么在Swift 3.0中找不到此方法?

我正在尝试运行以下行:

guard let spriteComponent = entity?.componentForClass(SpriteComponent.self) else {
   return
}
Run Code Online (Sandbox Code Playgroud)

并收到此:

类型“ GKEntity”的值没有成员“ componentForClass”

显然,苹果从GamePlayKit GkEntity类中删除了此方法。那么我应该使用哪种方法呢?

ios sprite-kit swift gameplay-kit swift3

3
推荐指数
1
解决办法
392
查看次数