This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Robert Carlsen (author)
Sat Aug 08 16:29:22 -0700 2009
| name | age | message | |
|---|---|---|---|
| |
README | ||
| |
ofxiPhoneAlertView.h | ||
| |
ofxiPhoneAlertView.mm |
README
Simple wrappers for UIKit classes, written as necessary.
ofxiPhoneAlertView:
// ofxiPhoneAlertView
// setup the list of buttons
vector<string> otherButtons;
otherButtons.push_back("Button 1");
otherButtons.push_back("Button 2");
// the args are: title, message, cancel button title ("" == omitted), vector of other button titles
ofxiPhoneAlertView *alert = new ofxiPhoneAlertView("Title","Here is the alert message.","",otherButtons);
// display the alert view
alert->show();
// I'm using the following methods in update()
// test if the alert is visible (bool):
alert->isVisible();
// test if the alert has been dismissed:
alert->isDismissed();
// get the selected button (int):
alert->getSelectedButton();
// if you use several alerts, you can distinguish between them via their title:
alert->getTitle();
// example logic:
switch(alert->getSelectedButton()){
case -1:
// cancel, or no selection
printf("alert = -1");
break;
case 0:
// first, non-cancel button
printf("alert = 0");
break;
case 1:
// next button. will be the second button after Cancel
printf("alert = 1, ok");
break;
}







