view addsubview

Are you developing an External using the LiveCode Externals SDK?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
seaniepie
Posts: 154
Joined: Wed Sep 07, 2011 10:56 am

view addsubview

Post by seaniepie » Mon Jan 28, 2013 5:28 pm

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

seaniepie
Posts: 154
Joined: Wed Sep 07, 2011 10:56 am

Solved: view addsubview

Post by seaniepie » Wed Jan 30, 2013 4:06 am

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>

Post Reply

Return to “Building Externals”