Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Custom Icons for ActionScreenController #19

Closed
ThorvaldAagaard opened this issue Apr 22, 2017 · 7 comments
Closed

Custom Icons for ActionScreenController #19

ThorvaldAagaard opened this issue Apr 22, 2017 · 7 comments

Comments

@ThorvaldAagaard
Copy link

Hi Gerrit

I like the way you have implemented Custom Icons for Tabs, but have you found a way I can use you Custom icons for a ActionSheet, or am I left with the buildt in icons?

let profilePicSheet = this.actionSheetCtrl.create({
  title: 'Upload your Picture',
  buttons: [
    {
      text: 'Take a Picture',
      role: 'destructive',
      icon: !this.platform.is('ios') ? 'camera' : null,
      handler: () => {
        this.getPicture(true);
      }
    }, {
      text: 'Cancel',
      role: 'cancel',
      icon: !this.platform.is('ios') ? 'close' : null,
      handler: () => {
      }
    }
  ]
});
profilePicSheet.present();

It seems like Ios is not supporting icons at all, and currently only the ionicicons can be used for other platforms

@GerritErpenstein
Copy link
Owner

Hi Thorvald!
I will look into adding icons to Action Sheets as soon the current beta has been released as a stable version. I hope to have some time tomorrow.
Thanks for the feature request!

@ThorvaldAagaard
Copy link
Author

Sounds great. Will I have to upgrade to Ionic CLI 3.0 to test the beta version ?

@GerritErpenstein
Copy link
Owner

No, you actually have to stay with ionic-cli 2.x right now.
See here for more info: README-BETA.md#warning-ionic-cli-300-betax-incompatible

@ThorvaldAagaard
Copy link
Author

Ok, I will stay on ionic-cli 2.2.0 for now.

I you should manage to implement the feature for ActionSheet, what will then be the requirements for my app? I can see the beta refers to Angular 4, and due to missing upgrade of AngularFire I am currently stuck at Ionic version 2

@GerritErpenstein
Copy link
Owner

The beta and succeeding stable release might work with Ionic 2.x. Just give it a try!

@GerritErpenstein
Copy link
Owner

I have a working prototype for adding custom icons to Action Sheet buttons. This one was a bit tricky as Ionic wasn't really developed with extending its core functionality in mind.
Give me a few days to clean up and test the code...

@GerritErpenstein
Copy link
Owner

Stable release in version 0.5.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants