开发者

Can I obtain a valid CGContext for drawing with just a @synthesize UIView dropped into a view controller view

开发者 https://www.devze.com 2023-01-11 01:38 出处:网络
Thank you in advance for any help, I am building a multipage iPad app,and each page has specialized calculations, they all work great, but i would like to make the user experience better with some sim

Thank you in advance for any help, I am building a multipage iPad app,and each page has specialized calculations, they all work great, but i would like to make the user experience better with some simple line drawings that represent the calculations, I am comfortable with the drawing once i get a valid CGcontext working, and this is where my problem is. I already have a webview on each page开发者_开发知识库 and now I want to have a UIView pop open with my drawing when the user presses the calculate button, My UIview is called drawingView and it will pop open like I want but from what i have read all drawing needs to be done within the DrawRect method in order to use the correct context. I think some of my problem is the syntax for getting the context. Thanks for any help Norman


Ok, I had to do what I wanted the old fashioned way, but it just seems like you should be able to get the current context of a UIView from wherever I want. By calling the view and getting it's current context. But when I do ,I get errors about not getting the current context. So, I have to make my app differently using traditional UIViews classes and bringing them into my page.

0

精彩评论

暂无评论...
验证码 换一张
取 消