Didikot's blog

Code & life snippets

Android SDK handle softinput events (open/close)

without comments 324 views

Like it or not, but we don’t have any events for softinput in the current SDK. Well, if you want to remove the unused views to make some extra space of the screen at the time of data entry? The only thing that managed to dig in the network is using onMeasure. I made a harness of his handler and now it somehow seems to be true.

First we need to extend desired Layout (as for my project – RelativeLayout) with onMeasure overriding

Read the rest of this entry »

Related Posts:

Written by didikot

February 22nd, 2012 at 9:12 P

IOS SDK Custom progress bar

with one comment 871 views

A small excerpt of a larger project. I hope someone will save time, this simple solution.
To visualize all three images are needed

Background image
background

Progressbar (full length)


and mask with alpha channel to fill progress


All that is required for the implementation of add 3 layers of view.layer one of which will layer.mask
do it in their custom init

Read the rest of this entry »

Related Posts:

Written by didikot

February 9th, 2012 at 10:38 P

Yet another Kalman filter implementation for Arduino

without comments 410 views

Written by didikot

February 4th, 2012 at 9:46 P

Simple Text Justify control for iOS SDK.

with 4 comments 1,972 views

Hello, There is one big problem in my current project. My client wished justifies text, but as for now, iOS UI controls don’t supporting them. So, what to do? Ask the customer roll away? Bad idea. I decided to spend some time to write such a control. When work is completed, it will look like this:

 

So, let’s get started.
Read the rest of this entry »

Related Posts:

Written by admin

October 1st, 2011 at 6:53 P

Animate curtains in iOS – simple with Transforms and CoreAnimation

without comments 1,814 views

Hello,
One of my friends asks me how to easily animate views like curtains. And which engine will help? The answer is simple, simple as CoreAnimation and View transforms.
We will simulate curtains rebound without any engine.
Look…

- (void)viewDidLoad
{
    [super viewDidLoad];
 
    firstCurtain = [[UIView alloc] initWithFrame:self.view.frame];
    secondCurtain = [[UIView alloc] initWithFrame:self.view.frame];
 
    //setup initial transfor of the curtains views
    firstCurtain.transform = CGAffineTransformMakeTranslation(0, -self.view.frame.size.height);
    secondCurtain.transform = CGAffineTransformMakeTranslation(0, self.view.frame.size.height);
 
    //colors
    firstCurtain.backgroundColor = [UIColor redColor];
    secondCurtain.backgroundColor = [UIColor blueColor];
 
    upscale = 1.0f; // initial scale value
    numCloses = 10; // will shot 10 times
 
    [self.view addSubview:firstCurtain];
    [self.view addSubview:secondCurtain];
 
    [self _animateCurtainsClose]; // will start initial animation
}

Read the rest of this entry »

Related Posts:

Written by didikot

March 27th, 2011 at 1:24 P

Five In Line – simple iPhone game goes OpenSource

with 2 comments 1,445 views

Now I decided to publish old games projects under open source (LGPL) license.
First of them – Five In Line game. This is classic board puzzle game with fun drop feature. It’s completely drawn by CoreGraphics. You can easily modify it to complete product and easily add more fun to gameplay.

Read the rest of this entry »

Related Posts:

Written by didikot

March 27th, 2011 at 11:30 P

XCODE 4 surprise

with one comment 784 views

So, dear Apple, WTF!!??

I think someone from MS is inside Apple XCode development team.

As for today, this is very unstable IDE, but we hope …

 

Related Posts:

Written by didikot

March 11th, 2011 at 12:24 P

Posted in iOS

Tagged with ,

Follow course and smooth crossing in Box2D

without comments 879 views

Written by didikot

February 2nd, 2011 at 2:13 P

Custom UIButton without using any images

without comments 4,487 views

Many probably faced with the need to quickly create a control in mobile user interface. Consider the standard buttons UIButton. Basic control little suits demanding customer, and often the standard solution is stretching on the button bitmaps state. Stretched it a picture or entirely cut button – the decision requires additional time spent on user interface design. It would be good to have a universal control, with more visual features than the basic UIButton.

Read the rest of this entry »

Related Posts:

Written by didikot

February 2nd, 2011 at 1:35 P

A-Space got New & Noteworthy in France!

without comments 768 views

Written by didikot

January 14th, 2011 at 9:07 P

A-Space released

with 3 comments 2,312 views

Written by didikot

January 12th, 2011 at 9:32 P

Epic crap

without comments 2,518 views

Written by didikot

December 22nd, 2010 at 11:05 P

Augmented reality Snow Scene is just released

with 7 comments 4,986 views

Written by didikot

December 22nd, 2010 at 8:23 P

Posted in iOS,Projects

Tagged with , , ,

Extending UITextView with custom, bottom aligned fields

with 5 comments 6,183 views

Sometimes we need to extend scrollable text with additional information, like website URL or telephone number, or simple signature of the author or quotation. Sure, UIWebView the simplest way to do it, but this is so expensive for memory.. and…. it LEACKS. I decided to develop extended UITextView control that should support additional fields

It will looks like this:
UITextView additional fields

Let’s go to extend UITextView. The only thing we need is our fields array.

Read the rest of this entry »

Related Posts:

Written by didikot

December 17th, 2010 at 8:33 P

Few words about iOS game development / Main GameObjects

with one comment 3,197 views

In this article I want to focus on certain aspects of game development for iOS.
One of the most important moments – to select the game engine.

Let’s try to start with a game-platformer. We will address problems such as level creation, the kinematics of objects in the levels, rendering representations of physical entities, etc. I do not want to use something ready, but the detector from the collision bullet, and then only from time savings. As result of all articles will complete XCode project of the game.

So, guys main job is build factories. Yes, yes, factories of the objects in whole game world.

Read the rest of this entry »

Related Posts:

Written by didikot

December 8th, 2010 at 9:16 P