Page 1 of 1

view addsubview

Posted: Mon Jan 28, 2013 5:28 pm
by seaniepie
Hi,

How would I implement and declare a "view addsubview:" to an external .mm? Do I need to create an empty view first or is there a way to make a self.view?

Cheers

Pi

Solved: view addsubview

Posted: Wed Jan 30, 2013 4:06 am
by seaniepie
Monte Goulding was helpful in providing the following code:

Code: Select all

UIView * tView;
LCInterfaceQueryView(&tView);
if (tView) {
	[tView addSubview:mySubview];
}
remember to also add in the declaration:

Code: Select all

#include <LiveCode.h>