Показаны сообщения с ярлыком iOS. Показать все сообщения
Показаны сообщения с ярлыком iOS. Показать все сообщения

9 июл. 2015 г.

23 июн. 2015 г.

iOS Games by Tutorials, 1st Edition


Год выпуска: 2013
Автор: Mike Berg, Ray Wenderlich, Tom Bradley
Жанр: Разработка
Издательство: Raywenderlich
Язык: Английский
Формат: PDF
Качество: eBook (изначально компьютерное)
Количество страниц: 831
Описание: Научитесь делать iOS игры!
Узнайте как сделать свои собственные игры для iOS с помощью нового фреймворка - Sprite Kit.
В этой книге, вы познакомитесь примерах мини игр, как воплотить ваши идеи в реальность!
В книге охватывается как базовый так и продвинутый уровень знаний.

(With source code!)

24 мая 2015 г.

UITextField анимация / UITextField animation

Каждому из нас очень часто приходится (например в окне ввода логина / пароля) сдвигать поля ввода чтобы клавиатура не перекрывала их и пользователь видел то что он вводит. Для сдвига с места обычно достаточно простой анимации, но мы как всегда - сделаем это красиво ;)

Представим что у нас на вьюхе есть три UITextField.  Создадим массив и добавим эти UITextField в него. UITextField уже размещены в нужных нам местах. Теперь при тапе на один из них (любой) появится клавиатура которая естественно перекроет UITextField (во многих ситуациях именно так и есть, особенно на iPad при Landscape ориентации устройства. Сдвигаем:

CGAffineTransform textFieldTranslationTransform;
textFieldTranslationTransform = CGAffineTransformMakeTranslation(0, -165);

Важно помнить, что место с которого будет передвигаться UITextField - центр равен 0. Когда элементы станут на новое место, центр каждого элемента станет опять 0. Чтобы опять поставить на место, вместо "-165" ставим "165". Т.е. цифры говорят о том, что мы передвинули не В координату, а НА определенное количество пунктов.

[_textFieldsArray enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
            
            UITextField *tField = (UITextField *)obj;
            
            [UIView animateWithDuration:0.9
                                  delay:0.05 * (double)idx
                 usingSpringWithDamping:0.5
                  initialSpringVelocity:0
                                options:UIViewAnimationOptionCurveLinear
                             animations:^{                     
                                 tField.center = CGPointApplyAffineTransform(tField.center,                                                                           textFieldTranslationTransform);
                             }
                             completion:nil];
        }];

7 мая 2015 г.

UIAlertView с блоком (без делегата) / UIAlertView with block (without delegate) iOS 7

Очень часто не хочется использовать UIAlertView - делегат для идентификации тапнутой пользователем кнопки, особенно если у Вас в контроллере UIAlertView несколько, то приходится присваивать даже tag для UIAlertView. Нашел на просторах UIAlertView с блоком. Очень упростила жизнь. Хотя во многих случаях тоже есть необходимость использовать обычный UIAlertView. Данный Tips&Tricks предназначен в основном для iOS 7, т.к. в iOS 8 уже есть UIAlertViewController (если мне не изменяет память, теперь присутствует тот же блок).

UIBAlertView *timesheetsSubmited = [[UIBAlertView alloc] initWithTitle:@"Title"
message:@"message"
cancelButtonTitle:@"cancel"
otherButtonTitles:@"ok", nil];

[timesheetsSubmited showWithDismissHandler:^(NSInteger selectedIndex,
                                             NSString *selectedTitle,
                                             BOOL didCancel) {
    if (selectedIndex == 1) {
        
        //code
    }
}];

5 мая 2015 г.

UINavigationBar анимация сокрытия-показа / UINavigationBar hide-show animation

Иногда необходимо немного больше места на экране для отображения более детального и большего количества информации. Обычно при этом прячут UINavigationBar. Почему бы это не сделать при помощи анимации:





- (void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];
    [self.navigationController.navigationBar lt_reset];
}

#pragma mark - UINavigationBar hide/show animation methods

- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
    CGFloat offsetY = scrollView.contentOffset.y;
    if (offsetY > 0) {
        if (offsetY >= 44) {
            [self setNavigationBarTransformProgress:1];
        } else {
            [self setNavigationBarTransformProgress:(offsetY / 44)];
        }
    } else {
        [self setNavigationBarTransformProgress:0];
        self.navigationController.navigationBar.backIndicatorImage = [UIImage new];
    }
}

- (void)setNavigationBarTransformProgress:(CGFloat)progress
{
    [self.navigationController.navigationBar lt_setTranslationY:(-44 * progress)];
    [self.navigationController.navigationBar lt_setContentAlpha:(1-progress)];
}

3 мая 2015 г.

Оптимизация производительности приложений для iOS

Книга демонстрирует, как совершенствовать, увеличивать и оптимизировать производительность приложений для операционной системы iOS. Вы быстро научитесь создавать быстрые и отзывчивые приложения, пригодные для распространения на коммерческой основе. Эта книга охватывает множество общих и вместе с тем сложных проблем, возникающих при оптимизации производительности приложений для iPhone и iPad, и подробно описывает, как эффективно их решать. Она содержит массу практических знаний, приемов, советов и рекомендаций, которые помогут вам преуспеть в конкурентном мире разработки приложений для iOS.

Издание предназначено для программистов разной квалификации, разрабатывающих мобильные приложения под iOS.

28 апр. 2015 г.

24 апр. 2015 г.

Penn J., Smith J. Build iOS Games with Sprite Kit: Unleash Your Imagination in Two Dimensions

For beginning iOS developers who want to write games and interactive applications.

Take your game ideas from paper to pixels using Sprite Kit, Apple's 2D game development engine. Build two exciting games using Sprite Kit and learn real-world, workshop-tested insights about game design, including cognitive complexity, paper prototyping, and levels of fun.

You'll learn how to implement sophisticated game features such as obstacles and weapons, power-ups and variable difficulty, physics, sound, special effects, and both single- and two-finger control. In no time, you'll be building your own thrilling iOS games.

Deitel P., Deitel H. Swift for Programmers

The Swift™ programming language was arguably the most significant announcement at Apple’s 2014 Worldwide Developers Conference. Although apps can still be developed in Objective-C®, Apple says that Swift is its applications programming and systems programming language of the future.

Swift is a contemporary language with simpler syntax than Objective-C. Because Swift is new, its designers were able to include popular programming language features from languages such as Objective-C, Java™, C#, Ruby, Python® and many others. These features include automatic reference counting (ARC), type inference, optionals, String interpolation, tuples, closures (lambdas), extensions, generics, operator overloading, functions with multiple return values, switch statement enhancements and more. We’ve been able to develop apps more quickly in Swift than with Objective-C and the code is shorter, clearer and runs faster on today’s multi-core architectures.
Swift also eliminates the possibility of many errors common in other languages, making your code more robust and secure. Some of these error-prevention features include no implicit conversions, ARC, no pointers, required braces around every control statement’s body, assignment operators that do not return values, requiring initialization of all variables and constants before they’re used, array bounds checking, automatic checking for overflow of integer calculations, and more. You can combine Swift and Objective-C in the same app to enhance existing Objective-C apps without having to rewrite all the code. Your apps will easily be able to interact with the Cocoa®/Cocoa Touch® frameworks, which are largely written in Objective-C.

You can also use the new Xcode playgrounds with Swift. A playground is an Xcode window in which you can enter Swift code that compiles and executes as you type it. This allows you to see and hear your code’s results as you write it, quickly find and fix errors, and conveniently experiment with features of Swift and the Cocoa/Cocoa Touch frameworks.
Practical, Example-Rich Coverage of:
Classes, Objects, Methods, Properties
Initializers, Deinitializers, Bridging
Tuples, Array and Dictionary Collections
Structures, Enumerations, Closures, ARC
Inheritance, Polymorphism, Protocols
Type Methods, Type Properties
Generics; Strings and Characters
Operator Overloading, Operator Functions, Custom Operators, Subscripts
Access Control; Type Casting and Checking
Nested Types, Nested Methods
Optionals, Optional Chaining, Extensions
Xcode, Playgrounds, Intro to Cocoa Touch® with a Fully Coded iOS® 8 Tip Calculator App
Overflow Operators, Attributes, Patterns

17 апр. 2015 г.

3 апр. 2015 г.

24 мар. 2015 г.

UIButton popup анимация / UIButton popup animation

Анимация кнопки (UIButton) по клику или без. Также можно анимировать любой другой контрол.








button.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.001, 0.001);
    [self.view addSubview:button];
    
    [UIView animateWithDuration:0.4/1.5 animations:^{
        button.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1.3, 1.3);
    } completion:^(BOOL finished) {
        [UIView animateWithDuration:0.4/2 animations:^{
            button.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.8, 0.8);
        } completion:^(BOOL finished) {
            [UIView animateWithDuration:0.4/2 animations:^{
                button.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1.1, 1.1);
            } completion:^(BOOL finished) {
                [UIView animateWithDuration:0.4/2 animations:^{
                    button.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1.0, 1.0);
                } completion:^(BOOL finished) {
                    button.transform = CGAffineTransformIdentity;
                }];
            }];
        }];

    }];

21 мар. 2015 г.

Beginning Xcode. Swift Edition

Beginning Xcode, Swift Edition will not only get you up and running with Apple’s latest version of Xcode, but it also shows you how to use Swift in Xcode and includes a variety of projects to build.
If you already have some programming experience with iOS SDK and Objective-C, but want a more in-depth tutorial on Xcode, especially Xcode with Apple’s new programming language, Swift, then Beginning Xcode, Swift Edition is for you. The book focuses on the new technologies, tools and features that Apple has bundled into the new Xcode 6, to complement the latest iOS 8 SDK.
By the end of this book, you’ll have all of the skills and a variety of examples to draft from to get your Swift app from idea to App Store with all the power of Xcode.
What you’ll learn
How to use Swift and new Swift-related features in Xcode
How to get started with Xcode, using Workspaces, Interface Builder, storyboarding, tables/collection views and more
How to dive deeper into Xcode using advanced searches, filtering, advanced editing, debugging, and source control
How to take advantage of Xcode’s vast libraries, frameworks and bundles
How to create exciting interactive apps for iPhone or iPad using Sprite Kit, Map Kit, and other Apple technologies
How to share your app using organizer, localization, auto layout, and more
Who this book is for
This book is for those with some Objective-C/Cocoa and/or iOS SDK app development experience, but want to be more efficient in writing and testing their code, and people who want to know in-depth examples of Swift in Xcode.

Название: Beginning Xcode. Swift Edition
Автор: Knott M.
Год: 2014
Издательство: Apress
ISBN: 978-1-4842-0538-9
Страниц: 544
Язык: Английский
Формат: PDF
Размер: 31 Mb

20 мар. 2015 г.

Swift Quick Syntax Reference

Swift Quick Syntax Reference is a condensed code and syntax reference to the new Apple Swift programming language, which is the alternative new programming language along side Objective-C behind the APIs found in the Apple iOS SDK 8 and OS X Yosemite SDK. It presents the essential Swift syntax in a well-organized format that can be used as a handy reference.

You won't find any technical jargon, bloated samples, drawn out history lessons, or witty stories in this book. What you will find is a language reference that is concise, to the point, and highly accessible. The book is packed with useful information and is a must-have for any Swift programmer.




Publisher: Apress
By: Matthew Campbell
ISBN: 978-1-484204-40-5
Year: 2014
Pages: 180
Language: English
File size: 4.6 MB
File format: PDF

Pro Design Patterns in Swift

The Swift programming language has transformed the world of iOS development and started a new age of modern Cocoa development. Pro Design Patterns in Swift shows you how to harness the power and flexibility of Swift to apply the most important and enduring design patterns to your applications, taking your development projects to master level.

This book will teach you those design patterns that have always been present at some level in your code, but may not have been recognized, acknowledged, or fully utilized. Implementation of specific pattern approaches will prove their value to any Swift developer.

Best-selling author Adam Freeman explains how to get the most from design patterns. He starts with the nuts-and-bolts and shows you everything through to advanced features, going in-depth to give you the knowledge you need.

Publisher: Apress
By: Adam Freeman
ISBN: 978-1-484203-95-8
Year: 2015
Pages: 592
Language: English
File size: 7.5 MB
File format: PDF

Swift for Absolute Beginners

The professional development team that brought you two editions of Objective-C for the Absolute Beginners and have taught thousands of developers around the world to write some of the most popular iPhone apps in their categories on the app store, have now leveraged their instruction for Swift.

Swift for Absolute Beginners is perfect for those with no programming background, those with some programming experience but no object-oriented experience, or those that have a great idea for an app but haven't programmed since school.

Gary Bennett and Brad Lees are full-time professional iOS developers and have developed a broad spectrum of apps for Fortune 500 companies. The authors have taken their combined 12 years of writing apps, teaching online iOS courses, the experience from their first two iOS books, along with their free online instruction and free online forum to create an excellent training book.


Publisher: Apress
By: Gary Bennett, Brad Lees
ISBN: 978-1-484208-87-8
Year: 2014
Pages: 308
Language: English
File size: 16.3 MB
File format: PDF