Closed brunoziie closed 5 years ago
Hi,
Yes I’m changing the iOS part to use material components and will be ready next week hopefully
Hey @henrychavez hows material going on? :) thanks
@davorpeic is going great, I almost got it.
It will be ready for the weekend
@davorpeic the version 1.4.0 now is implementing the BottomNavigation from material-components
@henrychavez I just tried and don't build.
I got stuck with Command xcodebuild failed with exit code 65.
.
When I rollback to version 1.3.0 works fine.
$ tns --version
4.2.1
$ xcodebuild -version
Xcode 10.0
Build version 10A255
@brunoziie There should be more info about code 65
error.
Clean platforms
and node_modules
folders, try again to run your command.
@alexandruantonica I already tried to remove and add platform again. I will try remove both now.
Solved.
I don't know why but when put this version together with nativescript-toast
its don't build.
Tks, @henrychavez and @alexandruantonica.
Great!
Happy Coding!
Hi! Thanks for awesome plugin. Can you help me with adding badges on ios? Simple example would be fine. Thanks!
@uzarsalan for now you can put this code inside your onBottomNavigationLoaded()
callback or where you think is convenient, but you need the reference of the native view.
onBottomNavigationLoaded(args) {
const bottomNavigation = args.object;
const tabIndex = 1;
const badgeValue = "2";
if (isIOS) {
cont tab = bottomNavigation.items[tabIndex];
tab.badgeValue(badgeValue);
} else {
// Android
bottomNavigation.setNotification(badgeValue, tabIndex);
}
}
I'm still working on a better implementation but this is a work around for now. you can find more information for iOS here and for android here
@henrychavez This workaround doesn't work in my case. Do we have any other way to implement the badges for both platforms?
@alexandruantonica I think this not working because in the code example wrote above the platform prefix is missing.
on Android is:
bottomNavigation.android.setNotification("1", 3);
on iOS maybe it's something like this:
cont tab = bottomNavigation.items[tabIndex];
tab.ios.badgeValue(badgeValue);
Thanks @brunoziie I'll check
const tab = bottomNavigation.ios.items[tabIndex];
tab.badgeValue = badgeValue;
BadgeValue is property, not a function
On Android the AHBottomNavigation has support for badges, so i can call
Is it possible to do on iOS too? If yes, can it turns a agnostic feature?