+#if wxOSX_USE_IPHONE
+ wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData();
+
+ CGContextSaveGState(m_cgContext);
+
+ CGColorRef col = wxMacCreateCGColor( fref->GetColour() );
+ CGContextSetTextDrawingMode (m_cgContext, kCGTextFill);
+ CGContextSetFillColorWithColor( m_cgContext, col );
+
+ wxCFStringRef text(str, wxLocale::GetSystemEncoding() );
+ DrawTextInContext( m_cgContext, CGPointMake( x, y ), fref->GetUIFont() , text.AsNSString() );
+
+ CGContextRestoreGState(m_cgContext);
+ CFRelease( col );