Sequence diagram with user interaction - uml

I am trying to draw a sequence diagram that requires user interaction. I tried to look for example online but I can't find it can anyone point me to the right direction?
I would like to draw a sequence on the ios application where I click a button that trigger the camera and wait for user to take the photo. Next this photo will be save to my database. My difficulty is how can I draw a sequence flow which ask for user input? Is there a controller that I need to add into my sequence diagram e.g iosManager for triggering the camera?

I would likely model it like this:
Complaint is the screen from where you start your complaint. It triggers the camera which comes up with it's own Camera GUI that awaits the shutter click and returns after that. The Camera controller then saves the picture and returns to the Complaint screen.

You could show the ViewController (Swift) and use an IBAction for the button press and an IBOutlet or whatever your choice for the prompt. However, I think you should feel free to add an "actor" (same character as in the use case diagram) that receives the prompt and presses the camera button if that speaks better to you.

Related

Difference between Floating action button (FAB) and Raised button

It would be interesting to know the usage difference between FAB and Raised Button. In which particular use-cases these buttons are to be used. ?
One example.
Can I use FAB in a static position (It doesn't scroll with content) ?
Thanks
Take a look at what official material guidelines say about FAB: (Google design guidelines)
Not every screen needs a floating action button. A floating action button represents the primary action in an application.
and
Make floating action buttons positive actions like Create, Favorite, Share, Navigate, and Explore.
Here some typical examples of FAB:
So what does it look like in real world app? Let's take a look at Gmail:
Always think about the current screen before using FAB. Is there any action that is likely to be used by most of the users? What is the point of this screen? What do you want the users to do with this screen?
FAB can also contain multiple actions (it's not in the official specs though) which are opened after touching the primary FAB. Evernote app uses that for example:
I hope this clears up the FAB usage a bit.
Raised button is regular button that can be used anywhere needed. It's just important to distinguish between raised button and flat button. Material guidelines are here to help you with that: Material design guidelines.

In phaser.js capture touch events on the canvas

I'm trying to make a simple game that has a single input based on lessmilk.com's Flappy Bird tutorial. On the keyboard you hit space to jump, but on touch enabled devices I'd like to just have the users touch anywhere on the canvas to jump.
Looking at the input docs it seems straight forward to capture touch input for a sprite, but I'd like the user to be able click/touch anywhere.
What's the "Phaser way" to capture all touch events? Do I need to do something hacky like create an invisible sprite covering the entire canvas? Should I bypass the phaser and just attach DOM event handlers?
Seems like I'd been misunderstanding the role of phaser's input manager. I'd been trying to use game.input.touch to hook those events but I just needed to be using the higher level input.onDown event:
// click / touch to jump
game.input.onDown.add(this.jump, this);

Detect Touch event in UIWebView

I want to finish such a demand, in the interface embedded UIWebView control, when the user clicks on a blank area and the area that link, jump to different new interface, but I can't distinguish between the two. Could someone help me?
I try put an transparent NSView over an UIWebView, and overide the touchesDidBegin etc, then send them to your webview. Ex: But the UIWebView can't accept touch events。

Magnifier like feature inside popup window....how to?

I need to create a magnifier like feature in my app. Like the "loupe" effect on the iphone !
The problem is that I need to do that inside a popup window and I don't get how to make it work !
The popup window display a grid of colors that I generate and draw one by one using shapeDrawables. What I want is to display that color bigger, zoom on it when the user touch and move his finger around the popup window (color grid). The idea is to create a tracking-zooming effect on the colors so the user can see more clearly under wich color his finger is currently located.
Problems are :
I can't seem to create another popup window on top of this one, Android limitation I think ?
If I modify the current shapeDrawable, resize it, change the boundaries, It needs to re-display the popup window before it takes effect (which is not acceptable of course)
So, anyone knows of a way I could draw over that popup window ?
EDIT :
I've tried solving this issue using a Custom Toast object...But it doesn't quite do the trick. It works, but toast object appears slowly and so the touch motion is not in sync at all with the user movement over the color grid.
I'm not sure if this will help you or not, but you might be able to accomplish this by using a second Activity... this second Activity would use Android's translucent theme if you include the following attribute in your manifest:
<activity android:theme="#android:style/Theme.Translucent">
This second activity will now only contain what you place in your layout. That is... the "real" activity you're running will still be visible behind it (anywhere you don't cover it up with views in the new layout).
You also might prefer Theme.Dialog if you really want to resemble a popup.
Something to keep in mind if you take this approach is you will probably want to override onWindowFocusChanged() in the new activity, and finish() in the event of you losing focus. Additionally, you'll need to figure out how to share your data between the two activities.

How Can I Make a UIButton With No Animation Effects?

I know the title may be misleading so I'm going to explain what I want to do here.
I have a UIButton, a HUGE UIButton, set right after my application's background image. I configured the button to show this image with a background image I set. When the user taps the button, it gets a huge gray shadow and I really don't want that. So how can I make a button that will maintain it's state no matter what the user tries to do with it? I really don't want it to change at all when the user interacts with it. In fact, I wanted to use an UIImageView instead just to avoid the button animation. Since I couldn't get taps out of the UIImageView, I decided to use a button, but no matter what I touch in IB, the button keeps getting that gray shadow, and I have configured the Selected State and other states to be exactly as my default state.
Figured it out.
glassBackground.adjustsImageWhenHighlighted = NO;
Ideally, I would have loved to do that with IB but I'm happy with this result.

Resources