Categories
askquestion

Possible to use iPhoneSimulators framework in a Cocoa App?

Possible to use iPhoneSimulators framework in a Cocoa App?

Ask Question

Asked
10 years, 6 months ago

Active
10 years, 6 months ago

Viewed
178 times

.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}

0

I am toying with the idea of creating a iPhone UI editor that isn’t Interface Builder! Mostly to see if it is possible to do… I have been able to link to the UIKit.framework in a Cocoa app that I have created by dynamically loading it (via NSBundle functionality). I have been able to instantiate an UIView from there. Now the question is… how do I get to whatever the UIView renders?

I am trying to figure out how Apple implemented their Simulator since it seems likely that they are using the frameworks under the iPhoneSimulator.platform folder to do the rendering and then displaying that in a Cocoa window…

I am not sure how far I can go with this idea..but if anyone has any ideas how to direct the output of the UIVIew to a bitmap then I could take that and display in my Cocoa window…

Thanks,

Peter

iphone cocoa cocoa-touch uiview ios-simulator

share|improve this question

edited Sep 2 ’09 at 6:55

Peter Hosey

92.3k1313 gold badges196196 silver badges362362 bronze badges

asked Sep 2 ’09 at 4:42

mobbemobbe

add a comment
 | 

1 Answer
1

Active

Oldest

Votes

1

You might try making an NSView subclass that hosts a UIWindow. In the NSView’s drawRect:, apply any necessary transformations, then send drawRect: to the UIWindow.

Then, set your simulator NSWindow’s content view to an instance of that subclass.

share|improve this answer

answered Sep 2 ’09 at 4:49

Peter HoseyPeter Hosey

92.3k1313 gold badges196196 silver badges362362 bronze badges

add a comment
 | 

Your Answer

Thanks for contributing an answer to Stack Overflow!Please be sure to answer the question. Provide details and share your research!But avoid …Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.To learn more, see our tips on writing great answers.

Draft saved
Draft discarded

Sign up or log in

Sign up using Google

Sign up using Facebook

Sign up using Email and Password

Submit

Post as a guest

Name

Email
Required, but never shown

Post Your Answer

Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

The Overflow Blog

Defending yourself against coronavirus scams

Podcast Episode 220: Fully Remote

Featured on Meta

Planned maintenance scheduled for Saturday, March 28, 2020 at 13:00 UTC (9AM…

An Update On Creative Commons Licensing

Community and Moderator guidelines for escalating issues via new response…

How does the Triage queue work?

Triage needs to be fixed urgently, and users need to be notified upon…

Related

415throwing an exception in objective-c/cocoa411Is It Possible to NSLog C Structs (Like CGRect or CGPoint)?5NIB/XIB files with Cocoa programming – faster development time?15Is there an easy to understand guide (new to Cocoa, Xcode, etc) for Interface Builder that talks about proxy objects?0Conceptualizing Cocoa Touch Views, Controllers & OO programming in general578Cocoa: What’s the difference between the frame and the bounds?419Is it possible to disable the network in iOS Simulator?640Cocoa Autolayout: content hugging vs content compression resistance priority0Running the iOS 7.0 simulator in XCode5: How to fix the window to display the standard iPhone frame

Hot Network Questions

How does FM station have fixed frequency when FM modulation changes the frequency?

Using cryptographically random password as both the password and the salt

What is Austria?

Why is water running into my water heater when cold water inlet is turned off?

When did Warren Harding say “I am not fit to be president.” Why?

What should I call a “differential” which cubes, rather than squares, to zero?

How much of the US media referred to the COVID-19 as the “Wuhan Virus” until it received an official designation from the WHO?

How can I calculate the duration of a function call?

Is it true that Netscape Navigator eventually became Mozilla Firefox?

How do “tip jet” helicopters cancel the torque effect of the main rotor?

Fixed vertical spacing between items

How to format an email properly so that the hiring committee re-issues the offer?

Is there a trick to help kids know which direction pawns are going?

Sard’s theorem and Cantor set

Correct use of quantifiers

Irregular aorist imperative from ἔχω

How is solid rocket fuel sourced?

When we press a piano key, why does a high pitch note not run for as long as a low pitch note?

Four distinct 8-bit integers

Refactoring multiple boolean conditions?

When filing taxes, how do I report “informal income” for which I don’t have any forms?

If a caster readies Time Stop and casts it as a reaction during another creature’s turn, what happens to that creature’s turn?

Fetch Encrypted Data ValueError: Request failed validation

What does “She ran up the stairs two at a time.” mean?

more hot questions

Question feed

Subscribe to RSS

Question feed
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

lang-c

Leave a Reply

Your email address will not be published. Required fields are marked *