May 26, 2013

TabBar Quick Start

This tutorial shows how fast to set Tab Bars in your project, and add third view to your tabbed application.
 About Tab Bars: For many applications, an even easier and more user-friendly approach will be implementing a tab bar (UITabBar) and tab bar controller(UITabBarController).Tab bars, like toolbars, present a rage of touchable choices on the bottom of the display but always use icons in their presentations.Tab bars are also dedicated to switching between multiple views in an application, making them the obvious choice for application that offer more features than can fit on a single iPhone screen.

1.Setting Up Your Project
Go to Xcode->File->New->Project. Choose "Tabbed application" in the window.Click next, set appropriate names to your projects.



2. After you finished setting your project, you will have window with 2View Controllers with tab bars.


3. Add new View Controller to your storyboard from object panel


4. Add .h,.m files for the third view controller. Go to File->New->File->Cocoa Toach->Objective-C class. Name your class as you wish.

5. Go to Storyboard, select the third view controller and write class name of the third view controller in class field


6.Drag Tab Icon from object panel to the third controller.


7.Drag from main controller to third one, and select view controllers.
8. Now you should have all three view controllers connected to the Tab Bar Controller.







May 25, 2013

UIPickerView. "Straight and to the point" tutorial.


This tutorial is a source of creating UIPickerView and filling it with data from an array of values.
1. Drop Picker View from Object Panel(right bottom side) on your view.

2. In your .h file, declare Picker View, Array(you will fill it with values for Picker View), String(variable which you would use for sting a value chosen from pricker view). 
Also, create properties for those variables. Do not forget to set UIPickerViewDelegate and UIPickerViewDataSource.
3.   Now, synthesize all properties in .m file, right after @implementation.
4. Go to storyboard and connect your View Controller with UIPickerView by dragging from View Controller to the picker.
5. Set DataSource, Delegate with your View Controller by dragging from from right panel to View Controller. At the moment of dragging, picker view should be selected. After all manipulations, your window should look like this:



6. Now, go to .m file and start coding. Fill array in ViewDidLoad method. The values of array will be shown in picker view.

7. The most important part is do net forget to write all  4 requiered methods for Picker Views:
method which counts rows in picker view:
 In our situation, we have an array, that is why we are counting objects of an array. In common cases, you can simply set number: return 10;

method which counts components in picker view:
method which assigns each value of the array to a proper row of a picker:
method which assigns selected item to the variable:
That is it. Run your program.You should get similar to the following:

May 19, 2013

Iphone игра "Мир Слов"

Правила игры в "Мир Слов"
Цель игры: составить как можно больше слов из одного слова

Техника: при помощи буквенных кнопок вводятся слова( состоящие из 3, 4, 5 и 6 букв), которые являются частью главного слова. Если слово есть в списке, то оно отображается в соответствующей колонке. Все слова в колонке находятся в алфавитном порядке. При отгадывании всех слов одной из колонок, открывается одна из букв "ключ" слова.

Уровни игры: переход к следующему уровню становится доступным после того, как ключ слово отгадано.