Can I Get Special Button By Native Code And Change Some Property?

Discussion in 'Technical Discussion' started by bdangvnt, Sep 17, 2016.

  1. bdangvnt

    bdangvnt Boxer

    Joined:
    Sep 17, 2016
    Messages:
    1
    Likes Received:
    0
    I define a customads and in native code ios, I have write bellow code:
    Code:
    -(void)showCustomFullscreenAd{
        //PTPScreen *screen = PTPScreen::getTopScreen();
        PTPScreen *screen = PTPScreen::getRunningScreen();
        std::vector<PTPObjectButton*> btns = screen->getButtons("Cross1");
        PTPObjectButton *btn = screen->getButton("Cross1");
        if (btn != NULL) {
            NSLog(@"PTPObjectButton");
        }
    }
    
    But variable *btns* size alway equals zero and *btn* alway is NULL.And in class PTPScreen, I see some methods:

    PTPObjectButton* getButton( const char* key );
    std::vector<PTPObjectButton*> getButtons(conststd::string &key);

    What is *key*? If can get PTPObjectButton then can i change button image?

    Please help me!
    Thank for advance!
     
  2. jeoncrack

    jeoncrack Boxer

    Joined:
    May 3, 2016
    Messages:
    5
    Likes Received:
    3
    same question, anyone have idea?
     
    bdangvnt likes this.

Share This Page