How To Show Same Images In Different For Sizes In Iphone And Ipad -
i want show image in webview problem want show same image in ipad , iphone in different sizes. in project getting image database getting url.how should vary iphone , ipad .please used code in css written sizes , attached tag in run time not replacre string why not replacing string dont know.if 1 knows plaese me in context .
if ([devicetype isequaltostring:@"ipad simulator"]) { //contentstring =[contentstring stringbyreplacingoccurrencesofstring:@"/>" withstring:@"width:\"30%\" height:\"30%\"/>"]; contentstring =[contentstring stringbyreplacingoccurrencesofstring:@"/>" withstring:@"class=\"img_ipad\"/>"]; } else { contentstring =[contentstring stringbyreplacingoccurrencesofstring:@"/>" withstring:@"width:\"70%\" height:\"70%\"/>"]; }
you should use construction:
#if __iphone_os_version_max_allowed >= 30200 if (ui_user_interface_idiom() == uiuserinterfaceidiompad) nslog(@"ipad idiom"); else #else nslog(@"iphone idiom"); #endif
Comments
Post a Comment