Is there a iOS demo available?
Hi all:
I am trying to use noesis-gui in my project, that is an ogre project in iOS platform.
I can't find a available demo or sample for iOS platform , other than some code piece in noesis tutorial.
So is there anyone to give me a suggestion or to send me a demo?
Any idea is welcome!
By the way, my email is *******************.
Thanks!
I am trying to use noesis-gui in my project, that is an ogre project in iOS platform.
I can't find a available demo or sample for iOS platform , other than some code piece in noesis tutorial.
So is there anyone to give me a suggestion or to send me a demo?
Any idea is welcome!
By the way, my email is *******************.
Thanks!
Re: Is there a iOS demo available?
You can find a full iOS integration sample at
https://github.com/Noesis/Tutorials/tre ... ration/iOS
But you will need a trial of noesisGUI for testing it. Please, contact us in private for that.
Thanks!
https://github.com/Noesis/Tutorials/tre ... ration/iOS
But you will need a trial of noesisGUI for testing it. Please, contact us in private for that.
Thanks!
Re: Is there a iOS demo available?
Thanks for your reply!
I have sent a email to [email protected] to request a newest trial version of noesisgui.
I have tried to study the iOS integration sample,
and i find nothing about event handling, such as touch response and register event.
Does this sample include the part of event handling in iOS platform?
Thanks!
I have sent a email to [email protected] to request a newest trial version of noesisgui.
I have tried to study the iOS integration sample,
and i find nothing about event handling, such as touch response and register event.
Does this sample include the part of event handling in iOS platform?
Thanks!
Re: Is there a iOS demo available?
We have not received any email yet.I have sent a email to [email protected] to request a newest trial version of noesisgui.
I am analyzing the iOS integration sample and effectively is not sending touch events to the renderer. It is very easy, you basically must use the following functions from the IRenderer instance (the global variable xamlRenderer found in ViewController.mm).I have tried to study the iOS integration sample,
and i find nothing about event handling, such as touch response and register event.
Does this sample include the part of event handling in iOS platform?
Code: Select all
void TouchDown(NsInt x, NsInt y, NsUInt32 id);
void TouchMove(NsInt x, NsInt y, NsUInt32 id);
void TouchUp(NsInt x, NsInt y, NsUInt32 id);
We will upgrade the integration sample accordingly.
Having done that, you can follow our multiplatform Touch and Manipulation tutorial.
Besides that, touch events are promoted to mouse events when not being handled. That allows you to use for example the MouseDown, MouseEnter and MouseLeave events of the Button class.
Re: Is there a iOS demo available?
I guess it 's a email problem, and I have resent it with another email addr: ************************We have not received any email yet.
Can you give me a rough schedule about the new integration sample?We will upgrade the integration sample accordingly.
By the way, I want to know whether noesisgui have a plan to support Metal in iOS platform, and when?
Thanks!
Re: Is there a iOS demo available?
The change is super easy. Just calling TouchDown, TouchMove and TouchUp whenever you receive the events from the iOS window.Can you give me a rough schedule about the new integration sample?
I wouldn't wait for having this solved in our repository because we are now 100% focused in the 1.3. But if this is very critical for you I would try to find time this week.
Yes, it is in the plan for v1.3.By the way, I want to know whether noesisgui have a plan to support Metal in iOS platform, and when?
Re: Is there a iOS demo available?
Thanks for your suggestions!
I make some change in Integration Sample for testing, the following are code pieces
ViewController.mm
WidgetTest.cpp
There are some linked errors, as bellow
So I confuse about the link error, and I'm sure that it is produced by MakeDelegate(&OnClickedButton).
I expect some help,thanks!
I make some change in Integration Sample for testing, the following are code pieces
ViewController.mm
Code: Select all
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *touch = [touches anyObject];
CGPoint p = [touch locationInView:self.view];
widget->_xamlRenderer->TouchDown(p.x, p.y, widget->_button);
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *touch = [touches anyObject];
CGPoint currentPoint = [touch locationInView:self.view];
widget->_xamlRenderer->TouchMove(p.x, p.y, widget->_button);
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *touch = [touches anyObject];
CGPoint p = [touch locationInView:self.view];
//_xamlRenderer->TouchUp(currentPoint.x, currentPoint.y, 3);
//Drawing::Point p = widget->_button->PointFromScreen(Drawing::Point(currentPoint.x, currentPoint.y));
widget->_xamlRenderer->TouchUp(p.x, p.y, widget->_button);
}
Code: Select all
void OnClickedButton(Ptr<BaseComponent>& sender, const RoutedEventArgs& e)
{
Ptr<Button> button = NsStaticCast<Ptr<Button>>(sender);
button->SetContent("Click Meaaaaa!");
}
void WidgetTest::init(){
_button = *new Button();
_button->SetContent("Click Me!");
_button->SetWidth(400);
_button->SetHeight(200);
_button->TouchUpEvent += MakeDelegate(&OnClickedButton);
_grid = *new Grid();
_grid->GetChildren()->Add(_button.GetPtr());
_xamlRenderer = Noesis::GUI::CreateRenderer(_grid.GetPtr());
}
void WidgetTest::Release(){
}
Code: Select all
Undefined symbols for architecture armv7:
"typeinfo for Noesis::Core::BaseComponent", referenced from:
typeinfo for Noesis::Core::Delegate<void (Noesis::Core::Ptr<Noesis::Core::BaseComponent>&, Noesis::Gui::RoutedEventArgs const&)>::MultiDelegate::DelegateVector in WidgetTest.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I expect some help,thanks!
Re: Is there a iOS demo available?
Just a few comments about your code:
You will probably need to scale the coordinates with the contentScale (needed for newer devices). Regarding the third parameter passed to TouchDown it must be a number that uniquely identifies the finger id (estimationUpdateIndex from UITouch class could be valid for that) or just a constant if you are not using multitouch.
The signature of the function that handles the event is not correct:
It must be a raw pointer instead of Ptr:
Regarding the error you are having I think it is due to having RTTI enabled in your project. Could you disable it? Right now, we should probably provide iOS binaries with RTTI enabled to avoid this. We are already doing that in OSX.
Code: Select all
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *touch = [touches anyObject];
CGPoint p = [touch locationInView:self.view];
widget->_xamlRenderer->TouchDown(p.x, p.y, widget->_button);
}
Code: Select all
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
CGFloat s = self.layer.contentsScale;
CGPoint pt = [[touches anyObject] locationInView:self];
NsSize x = NsSize(pt.x * s);
NsSize y = NsSize(pt.y * s);
widget->_xamlRenderer->TouchDown(x, y, 0);
}
Code: Select all
void OnClickedButton(Ptr<BaseComponent>& sender, const RoutedEventArgs& e)
{
Ptr<Button> button = NsStaticCast<Ptr<Button>>(sender);
button->SetContent("Click Meaaaaa!");
}
Code: Select all
void OnClickedButton(BaseComponent* sender, const RoutedEventArgs& e)
{
Button* button = (Button*)(sender);
button->SetContent("Click Meaaaaa!");
}
Re: Is there a iOS demo available?
Thanks for your help!
I followed your suggestions as bellow:
1. I disabled RTTI.
2. I changed the signature of the function OnClickedButton.
3. I set the third param of TouchDown to 0.
4. I considered the contentsScale of self.view
And it can be linked successfully,
However, there are still two questions
1. the handler function OnClickedButton was not triggered when I clicked the button.
2. the app would crash if I called the following code
and error log
Thanks!
I followed your suggestions as bellow:
1. I disabled RTTI.
2. I changed the signature of the function OnClickedButton.
3. I set the third param of TouchDown to 0.
4. I considered the contentsScale of self.view
And it can be linked successfully,
However, there are still two questions
1. the handler function OnClickedButton was not triggered when I clicked the button.
2. the app would crash if I called the following code
Code: Select all
UITouch *touch = [touches anyObject];
NSNumber* touchId = [touch estimationUpdateIndex]
Code: Select all
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITouch estimationUpdateIndex]: unrecognized selector sent to instance 0x1769d3a0'
*** First throw call stack:
(0x21bdffef 0x3026bc8b 0x21be5409 0x21be3327 0x21b12e78 0xf5f49 0x253daaed 0x2528d3f9 0x25286da1 0x2525cf95 0x254d38ab 0x2525b9a9 0x21ba5faf 0x21ba53bf 0x21ba3a25 0x21af0201 0x21af0013 0x2946f201 0x252bca09 0xf3457 0x3081daaf)
libc++abi.dylib: terminating with uncaught exception of type NSException
Re: Is there a iOS demo available?
Hmmm, forget about estimationUpdateIndex for now and use always 0 as touchId.
Who is online
Users browsing this forum: Ahrefs [Bot] and 6 guests