Round Specific Corners SwiftUI

Using as a custom modifier You can use it like a normal modifier: .cornerRadius(20, corners: [.topLeft, .bottomRight]) Demo You need to implement a simple extension on View like this: extension View { func cornerRadius(_ radius: CGFloat, corners: UIRectCorner) -> some View { clipShape( RoundedCorner(radius: radius, corners: corners) ) } } And here is the struct … Read more

What is the shortest perceivable application response delay?

The 100 ms threshold was established over 30 yrs ago. See: Card, S. K., Robertson, G. G., and Mackinlay, J. D. (1991). The information visualizer: An information workspace. Proc. ACM CHI’91 Conf. (New Orleans, LA, 28 April-2 May), 181-188. Miller, R. B. (1968). Response time in man-computer conversational transactions. Proc. AFIPS Fall Joint Computer Conference … Read more

Is functional GUI programming possible? [closed]

The Haskell approach seems to be to just wrap imperative GUI toolkits (such as GTK+ or wxWidgets) and to use “do” blocks to simulate an imperative style That’s not really the “Haskell approach” — that’s just how you bind to imperative GUI toolkits most directly — via an imperative interface. Haskell just happens to have … Read more

Blackberry – fields layout animation

This effect may be easily achived with custom layout: class AnimatedManager extends Manager { int ANIMATION_NONE = 0; int ANIMATION_CROSS_FLY = 1; boolean mAnimationStart = false; Bitmap mBmpBNormal = Bitmap.getBitmapResource(“blue_normal.png”); Bitmap mBmpBFocused = Bitmap.getBitmapResource(“blue_focused.png”); Bitmap mBmpRNormal = Bitmap.getBitmapResource(“red_normal.png”); Bitmap mBmpRFocused = Bitmap.getBitmapResource(“red_focused.png”); Bitmap mBmpYNormal = Bitmap.getBitmapResource(“yellow_normal.png”); Bitmap mBmpYFocused = Bitmap.getBitmapResource(“yellow_focused.png”); Bitmap mBmpGNormal = Bitmap.getBitmapResource(“green_normal.png”); Bitmap … Read more