# How to force popover with MD style in iOS device

**URL:** <https://forum.ionicframework.com/t/how-to-force-popover-with-md-style-in-ios-device/67277>\
**Category:** ionic-v3\
**Created:** [October 17, 2016, 9:39pm UTC](https://forum.ionicframework.com/t/how-to-force-popover-with-md-style-in-ios-device/67277 "2016-10-17T21:39:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gigocabrera](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gigocabrera/32/123546_2.png) [@gigocabrera](https://forum.ionicframework.com/u/gigocabrera)\
**Post date:** [October 17, 2016, 9:39pm UTC](https://forum.ionicframework.com/t/how-to-force-popover-with-md-style-in-ios-device/67277/1 "2016-10-17T21:39:12Z")

</div>

I want to force the MD style on a popover control in my app even when it is installed in an iOS device. Personally, I think it looks better and I see it in the Google app.

Is this possible? If so, how?

---

<div class="post-metadata">

**Author:** ![gigocabrera](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gigocabrera/32/123546_2.png) [@gigocabrera](https://forum.ionicframework.com/u/gigocabrera)\
**Post date:** [October 18, 2016, 4:13pm UTC](https://forum.ionicframework.com/t/how-to-force-popover-with-md-style-in-ios-device/67277/2 "2016-10-18T16:13:59Z")

</div>

> [@brandyshea](#):
>
> There is currently no way to set a single component to match the styles of a different platform, but you could override the iOS Sass variables to get close to that of Androids. If this is a feature you’d like - could you create an issue and we can discuss it? Thanks! [Issues · ionic-team/ionic-framework · GitHub](http://ionicframework.com/submit-issue/)

@brandyshea you posted the above quote back in February. Is this possible now with RC1? I’m only interested in the popover control

---

<div class="post-metadata">

**Author:** ![gigocabrera](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gigocabrera/32/123546_2.png) [@gigocabrera](https://forum.ionicframework.com/u/gigocabrera)\
**Post date:** [October 18, 2016, 11:36pm UTC](https://forum.ionicframework.com/t/how-to-force-popover-with-md-style-in-ios-device/67277/3 "2016-10-18T23:36:35Z")

</div>

I found the [Platform Specific Styles](https://ionicframework.com/docs/v2/theming/platform-specific-styles/) in the docs and the [Config API](https://ionicframework.com/docs/v2/api/config/Config/) docs.

Based on those docs, I added the following config entries but I don’t get the MD style for the popover in an iOS device.

```
imports: [
    IonicModule.forRoot(MyApp, {
      popoverEnter: 'popover-md-pop-in',
      popoverLeave: 'popover-md-pop-out'
    }),
    AngularFireModule.initializeApp(firebaseConfig, firebaseAuthConfig)
  ],

```

Am I missing something or is this a bug?

---

<div class="post-metadata">

**Author:** ![gigocabrera](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gigocabrera/32/123546_2.png) [@gigocabrera](https://forum.ionicframework.com/u/gigocabrera)\
**Post date:** [October 31, 2016, 4:17pm UTC](https://forum.ionicframework.com/t/how-to-force-popover-with-md-style-in-ios-device/67277/4 "2016-10-31T16:17:41Z")

</div>

For anybody else out there asking the same question, this is a bug

> <https://github.com/ionic-team/ionic/issues/8806>

---

<div class="post-metadata">

**Author:** ![leonardoss](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/leonardoss/32/114499_2.png) [@leonardoss](https://forum.ionicframework.com/u/leonardoss)\
**Post date:** [March 7, 2018, 5:59pm UTC](https://forum.ionicframework.com/t/how-to-force-popover-with-md-style-in-ios-device/67277/5 "2018-03-07T17:59:24Z")

</div>

I find a workaround for that, it starts by adding the popoverEnter and popoverLeave config.

```auto
      popoverEnter: 'popover-md-pop-in',
      popoverLeave: 'popover-md-pop-out'

```

and in popover creation just add ‘popover-md’ class:

```auto
let popover = this.popoverCtrl.create('SelectMenuPage', {}, { cssClass: 'popover-md' });
popover.present({
  ev: myEvent
});

```

---

<div class="post-metadata">

**Author:** ![sonicwong](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@sonicwong](https://forum.ionicframework.com/u/sonicwong)\
**Post date:** [October 23, 2019, 7:00am UTC](https://forum.ionicframework.com/t/how-to-force-popover-with-md-style-in-ios-device/67277/6 "2019-10-23T07:00:33Z")

</div>

Try this (this will set the global style to ‘md’ mode):

```auto
this.popoverCtrl.config.set('mode', 'md');

```

Remember to set back to ios mode when popover opened.

```auto
this.popoverCtrl.config.set('mode', 'ios');

```

---

<div class="post-metadata">

**Author:** ![helpmelearn](https://avatars.discourse-cdn.com/v4/letter/h/f0a364/32.png) [@helpmelearn](https://forum.ionicframework.com/u/helpmelearn)\
**Post date:** [November 1, 2019, 3:50pm UTC](https://forum.ionicframework.com/t/how-to-force-popover-with-md-style-in-ios-device/67277/7 "2019-11-01T15:50:02Z")

</div>

This does work. How do I turn it off when the popover opens? Thanks

```auto
this.popoverCtrl.config.set('mode', 'ios');

        let popover = this.popoverCtrl.create(popoverPage);
        popover.present({
          ev: myEvent
        });

```

---

<div class="post-metadata">

**Author:** ![sonicwong](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@sonicwong](https://forum.ionicframework.com/u/sonicwong)\
**Post date:** [November 5, 2019, 4:12am UTC](https://forum.ionicframework.com/t/how-to-force-popover-with-md-style-in-ios-device/67277/8 "2019-11-05T04:12:58Z")

</div>

Use the controller inside modal:

```auto
import { ViewController } from 'ionic-angular';
constructor(
    private viewCtrl: ViewController
){}
...
this.viewCtrl.dismiss();

```
