SlideShare a Scribd company logo
TIPS
                           Извадки от xCode проекти




Thursday, January 26, 12
BLOCKS & ANIMATIONS

    [UIView animateWithDuration:0.3 animations:^{
                CGRect newFrame = self.frame;
                newFrame.origin.y = 0;
                self.frame = newFrame;
                self.alpha = 1;
                shown = YES;
            }
                             completion:^ (BOOL finished) {
                                 if (finished) {
                                     //shown = YES;
                                 }
                             }];




Thursday, January 26, 12
ANIMATIONS

    • когато   изпълняваме анимация стойността, която
        променяме получава новата си стойност незабавно
        само визуализацията се забавя /в друг thread/

    • при           прекъсване на анмацията не се изпълнява
        completion:^

    • анимация  може да прекъсва друга анимация и да
        продължава от позицията до която е стигнала


Thursday, January 26, 12
ANIMATIONS
           - (void)blink {
               if (shown) return;

                  [UIView animateWithDuration:0.3 animations:^{
                      CGRect newFrame = self.frame;
                      newFrame.origin.y = 0;
                      self.frame = newFrame;
                      self.alpha = 1;
                  }
                                   completion:^ (BOOL finished) {
                                       if (finished) {
                                           //// Revert image view to original.
                                           sleep(3);
                                           shown = YES;
                                           [self hide:YES];
                                       }
                                   }];


               [[NSNotificationCenter defaultCenter]
           postNotificationName:kStatusBarPositionChange object:nil userInfo:[NSDictionary
           dictionaryWithObject:[NSValue valueWithCGRect:self.frame] forKey:@"frame"]];
           }

                                                      if ([userInfo objectForKey:@"frame"]) {
         Как да вземем frame от Value                 !
                                                      !
                                                          !
                                                          }
                                                                 statusBarFrame = [[userInfo objectForKey:@"frame"] CGRectValue];



Thursday, January 26, 12
USERINFO



             [[NSNotificationCenter defaultCenter]
             postNotificationName:kStatusBarPositionChange object:nil
             userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSValue
             valueWithCGRect:self.frame], @"frame", [NSNumber
             numberWithFloat:animationDuration], @"duration", nil]];




Thursday, January 26, 12
CUSTOM BUTTONS
           Зареждане на картинки за различни състояния на
                        UIButtonTypeCustom


                  imgName = [imgName stringByReplacingOccurrencesOfString:@".png"
                  withString:@""];
                  !
                  [btn setBackgroundImage:[UIImage imageNamed:[NSString
                  stringWithFormat:@"%@.png", imgName]] forState:UIControlStateNormal];
                  [btn setImage:[UIImage imageNamed:[NSString
                  stringWithFormat:@"%@_high.png", imgName]]
                  forState:UIControlStateHighlighted];




Thursday, January 26, 12
UISCROLLVIEW


                              Навигация до определен обект
                              [scrollView scrollRectToVisible:temp
                              animated:NO];




Thursday, January 26, 12
MODAL VIEWS
                            Different view hierarchy




Thursday, January 26, 12
ЗА КАКВО СЕ ИЗПОЛЗВАТ?

    • Незабавно                 събиране на информация от потребителя

    • Временно                 показване на съдържание

    • Промяна                 на работната среда

    • Различни                интерфейси за различните ориентации

    • Нова                 иерархия от UIView


Thursday, January 26, 12
current task or workflow.




                           To learn more about defining a modal view in your code, see UIViewController Class Reference .


                                          MODAL VIEW
                           Appearance and Behavior
                           A modal view occupies the entire application screen, which strengthens the user’s perception of entering a
           Необходим е отговор преди потребителят да може да
                           separate, transient mode in which they can accomplish something. On iPad, a modal view might also occupy
                           the entire area of a parent view, such as a popover.
                                                    продължи the controls necessary to perform the task. A modal
                 A modal view can display text if appropriate, and contains
                           view generally displays a button that completes the task and dismisses the view, and a Cancel button users
Thursday, January 26, 12   can tap to abandon the task.
MODALVIEW УПОТРЕБА




                            Transition
Thursday, January 26, 12
ЗА КАКВО СЕ ИЗПОЛЗВА?
                           Drawing canvas
                                            писане на
                                             писмо
                           Drawing canvas
                                                   временно
                                                  представяне
                             Organizer



                               Help

Thursday, January 26, 12
UIModalPresentati


                                                                                       Presenting View Controllers From Other View Controllers
                                                                                       Configuring the Presentation Style for Modal Views




          IPAD PRESENTATION STYLES
                                                                                       Figure 9-4      iPad presentation styles




                                                                                                                                                        UIModalPresentationFullScreen                                                    UIModalPresentati


             Presenting View Controllers From Other View Controllers
             Configuring the Presentation Style for Modal Views




             Figure 9-4     iPad presentation styles




                                                                       UIModalPresentationFullScreen                                                    UIModalPresentationPageSheet                                                     UIModalPresentati




                                                                                                                                                                                For guidance on when to use the different presentation styles, see “Po
                                                                                                                                                                                Guidelines .



            UIModalPresentationFullScreenUIModalPresentationPageSheet
                                                         UIModalPresentationPageSheet UIModalPresentationFormSheet
                                                                                                     UIModalPresentationFormSheet
                                                                                                                                                                                                                   2012-‐01-‐09 | © 2012 Apple Inc. All Rights Rese

                                                                                                                                                                                                                                           85




                                                                                       For guidance on when to use the different presentation styles, see “Popover (iPad Only)” in iOS Human Interface
                                                                                       Guidelines .



                                                                       UIModalPresentationFormSheet
                                                                                                                                  2012-‐01-‐09 | © 2012 Apple Inc. All Rights Reserved.
Thursday, January 26, 12
IDESK - SEND EMAIL




Thursday, January 26, 12
Presenting View Controllers From Other View Controllers
                   About View Controller Presentation




                                        PRESENT MODAL
                   and then presents another view controller (the people picker) in response to that action. Selecting a contact
                   (or canceling the people picker) dismisses that interface and takes the user back to the photo library. Tapping
                   the Done button then dismisses the photo library and takes the user back to the camera interface.


                   Figure 9-2        Creating a chain of modal view controllers




                              Camera                      Photo library           Action sheet        People picker
                           view controller             navigation controller                       navigation controller


                                             present                                present
                                             modally                                modally




                   Each view controller in a chain of presented view controllers has pointers to the other objects surrounding it
Thursday, January 26, 12
TRANSITIONS




                       Vertical slide   Flip   PartialCurl



Thursday, January 26, 12
NAVIGATION OR MODAL
                           Как да изберем?




Thursday, January 26, 12
NAVIGATION / MODAL VIEW




                           Необходимо е потребителят да въведе текст
Thursday, January 26, 12
NAVIGATION / MODAL VIEW




Thursday, January 26, 12
NAVIGATIONCONTROLLER


                                     push                 push                push

                                      pop                 pop                  pop


                           [self.navigationController pushViewController:tableVC animated:YES];

                           [self.navigationController popViewControllerAnimated:YES];




Thursday, January 26, 12
РАЗЛИКАТА
                           push      push   push

                           pop       pop    pop


                           present

                           dismiss



Thursday, January 26, 12
MODALVIEWCONTROLLER


                                            present

                                            dismiss


                           [self presentModalViewController:tableVC animated:YES];

                           [self dismissModalViewControllerAnimated:YES];




Thursday, January 26, 12
ЗА СЛЕДВАЩИЯТ ПЪТ


    • nsnotification        & targets

    • blocks

    • nstimer

    • mapKit




Thursday, January 26, 12

More Related Content

Similar to iOS Tips + ModalVC

004
004004
Learn swiftla animations
Learn swiftla animationsLearn swiftla animations
Learn swiftla animations
Raghav Mangrola
 
Solid angular
Solid angularSolid angular
Solid angular
Nir Kaufman
 
Core animation taobao
Core animation taobaoCore animation taobao
Core animation taobao
yarshure Kong
 
CFUGbe talk about Angular JS
CFUGbe talk about Angular JSCFUGbe talk about Angular JS
CFUGbe talk about Angular JS
Alwyn Wymeersch
 
L0020 - The Basic RCP Application
L0020 - The Basic RCP ApplicationL0020 - The Basic RCP Application
L0020 - The Basic RCP Application
Tonny Madsen
 
Optimize CollectionView Scrolling
Optimize CollectionView ScrollingOptimize CollectionView Scrolling
Optimize CollectionView Scrolling
Andrea Prearo
 
Test and profile your Windows Phone 8 App
Test and profile your Windows Phone 8 AppTest and profile your Windows Phone 8 App
Test and profile your Windows Phone 8 App
Michele Capra
 
Integrating Angular js & three.js
Integrating Angular js & three.jsIntegrating Angular js & three.js
Integrating Angular js & three.js
Josh Staples
 
Building a camera in a program | Computer Graphics
Building a camera in a program | Computer GraphicsBuilding a camera in a program | Computer Graphics
Building a camera in a program | Computer Graphics
Aravindhan Anbazhagan
 
AngularJS intro
AngularJS introAngularJS intro
AngularJS intro
dizabl
 
My Favourite 10 Things about Xcode/ObjectiveC
My Favourite 10 Things about Xcode/ObjectiveCMy Favourite 10 Things about Xcode/ObjectiveC
My Favourite 10 Things about Xcode/ObjectiveC
JohnKennedy
 
I os 11
I os 11I os 11
I os 11
信嘉 陳
 
Session 15 - Working with Image, Scroll, Collection, Picker, and Web View
Session 15  - Working with Image, Scroll, Collection, Picker, and Web ViewSession 15  - Working with Image, Scroll, Collection, Picker, and Web View
Session 15 - Working with Image, Scroll, Collection, Picker, and Web View
Vu Tran Lam
 
Android Wear Essentials
Android Wear EssentialsAndroid Wear Essentials
Android Wear Essentials
Nilhcem
 
Lesson10
Lesson10Lesson10
Lesson10
renguzi
 
Daniel Jalkut - dotSwift 2019
Daniel Jalkut - dotSwift 2019Daniel Jalkut - dotSwift 2019
Daniel Jalkut - dotSwift 2019
DanielJalkut
 
Vue.js part1
Vue.js part1Vue.js part1
Vue.js part1
욱래 김
 
From Swing to JavaFX
From Swing to JavaFXFrom Swing to JavaFX
From Swing to JavaFX
Yuichi Sakuraba
 
Jface
JfaceJface

Similar to iOS Tips + ModalVC (20)

004
004004
004
 
Learn swiftla animations
Learn swiftla animationsLearn swiftla animations
Learn swiftla animations
 
Solid angular
Solid angularSolid angular
Solid angular
 
Core animation taobao
Core animation taobaoCore animation taobao
Core animation taobao
 
CFUGbe talk about Angular JS
CFUGbe talk about Angular JSCFUGbe talk about Angular JS
CFUGbe talk about Angular JS
 
L0020 - The Basic RCP Application
L0020 - The Basic RCP ApplicationL0020 - The Basic RCP Application
L0020 - The Basic RCP Application
 
Optimize CollectionView Scrolling
Optimize CollectionView ScrollingOptimize CollectionView Scrolling
Optimize CollectionView Scrolling
 
Test and profile your Windows Phone 8 App
Test and profile your Windows Phone 8 AppTest and profile your Windows Phone 8 App
Test and profile your Windows Phone 8 App
 
Integrating Angular js & three.js
Integrating Angular js & three.jsIntegrating Angular js & three.js
Integrating Angular js & three.js
 
Building a camera in a program | Computer Graphics
Building a camera in a program | Computer GraphicsBuilding a camera in a program | Computer Graphics
Building a camera in a program | Computer Graphics
 
AngularJS intro
AngularJS introAngularJS intro
AngularJS intro
 
My Favourite 10 Things about Xcode/ObjectiveC
My Favourite 10 Things about Xcode/ObjectiveCMy Favourite 10 Things about Xcode/ObjectiveC
My Favourite 10 Things about Xcode/ObjectiveC
 
I os 11
I os 11I os 11
I os 11
 
Session 15 - Working with Image, Scroll, Collection, Picker, and Web View
Session 15  - Working with Image, Scroll, Collection, Picker, and Web ViewSession 15  - Working with Image, Scroll, Collection, Picker, and Web View
Session 15 - Working with Image, Scroll, Collection, Picker, and Web View
 
Android Wear Essentials
Android Wear EssentialsAndroid Wear Essentials
Android Wear Essentials
 
Lesson10
Lesson10Lesson10
Lesson10
 
Daniel Jalkut - dotSwift 2019
Daniel Jalkut - dotSwift 2019Daniel Jalkut - dotSwift 2019
Daniel Jalkut - dotSwift 2019
 
Vue.js part1
Vue.js part1Vue.js part1
Vue.js part1
 
From Swing to JavaFX
From Swing to JavaFXFrom Swing to JavaFX
From Swing to JavaFX
 
Jface
JfaceJface
Jface
 

More from Marian Ignev

Какво е Startup?
Какво е Startup?Какво е Startup?
Какво е Startup?
Marian Ignev
 
PaaS бъдещето на креативния програмист!
PaaS бъдещето на креативния програмист!PaaS бъдещето на креативния програмист!
PaaS бъдещето на креативния програмист!
Marian Ignev
 
iOS UI Table Views
iOS UI Table ViewsiOS UI Table Views
iOS UI Table Views
Marian Ignev
 
iOS Memory management & Navigation
iOS Memory management & NavigationiOS Memory management & Navigation
iOS Memory management & Navigation
Marian Ignev
 
iOS Views
iOS ViewsiOS Views
iOS Views
Marian Ignev
 
The messy lecture
The messy lectureThe messy lecture
The messy lecture
Marian Ignev
 
iOS Architecture and MVC
iOS Architecture and MVCiOS Architecture and MVC
iOS Architecture and MVC
Marian Ignev
 
iOS Development - Intro
iOS Development - IntroiOS Development - Intro
iOS Development - Intro
Marian Ignev
 

More from Marian Ignev (8)

Какво е Startup?
Какво е Startup?Какво е Startup?
Какво е Startup?
 
PaaS бъдещето на креативния програмист!
PaaS бъдещето на креативния програмист!PaaS бъдещето на креативния програмист!
PaaS бъдещето на креативния програмист!
 
iOS UI Table Views
iOS UI Table ViewsiOS UI Table Views
iOS UI Table Views
 
iOS Memory management & Navigation
iOS Memory management & NavigationiOS Memory management & Navigation
iOS Memory management & Navigation
 
iOS Views
iOS ViewsiOS Views
iOS Views
 
The messy lecture
The messy lectureThe messy lecture
The messy lecture
 
iOS Architecture and MVC
iOS Architecture and MVCiOS Architecture and MVC
iOS Architecture and MVC
 
iOS Development - Intro
iOS Development - IntroiOS Development - Intro
iOS Development - Intro
 

Recently uploaded

Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
Pravash Chandra Das
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
saastr
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
flufftailshop
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 

Recently uploaded (20)

Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 

iOS Tips + ModalVC

  • 1. TIPS Извадки от xCode проекти Thursday, January 26, 12
  • 2. BLOCKS & ANIMATIONS [UIView animateWithDuration:0.3 animations:^{ CGRect newFrame = self.frame; newFrame.origin.y = 0; self.frame = newFrame; self.alpha = 1; shown = YES; } completion:^ (BOOL finished) { if (finished) { //shown = YES; } }]; Thursday, January 26, 12
  • 3. ANIMATIONS • когато изпълняваме анимация стойността, която променяме получава новата си стойност незабавно само визуализацията се забавя /в друг thread/ • при прекъсване на анмацията не се изпълнява completion:^ • анимация може да прекъсва друга анимация и да продължава от позицията до която е стигнала Thursday, January 26, 12
  • 4. ANIMATIONS - (void)blink { if (shown) return; [UIView animateWithDuration:0.3 animations:^{ CGRect newFrame = self.frame; newFrame.origin.y = 0; self.frame = newFrame; self.alpha = 1; } completion:^ (BOOL finished) { if (finished) { //// Revert image view to original. sleep(3); shown = YES; [self hide:YES]; } }]; [[NSNotificationCenter defaultCenter] postNotificationName:kStatusBarPositionChange object:nil userInfo:[NSDictionary dictionaryWithObject:[NSValue valueWithCGRect:self.frame] forKey:@"frame"]]; } if ([userInfo objectForKey:@"frame"]) { Как да вземем frame от Value ! ! ! } statusBarFrame = [[userInfo objectForKey:@"frame"] CGRectValue]; Thursday, January 26, 12
  • 5. USERINFO [[NSNotificationCenter defaultCenter] postNotificationName:kStatusBarPositionChange object:nil userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSValue valueWithCGRect:self.frame], @"frame", [NSNumber numberWithFloat:animationDuration], @"duration", nil]]; Thursday, January 26, 12
  • 6. CUSTOM BUTTONS Зареждане на картинки за различни състояния на UIButtonTypeCustom imgName = [imgName stringByReplacingOccurrencesOfString:@".png" withString:@""]; ! [btn setBackgroundImage:[UIImage imageNamed:[NSString stringWithFormat:@"%@.png", imgName]] forState:UIControlStateNormal]; [btn setImage:[UIImage imageNamed:[NSString stringWithFormat:@"%@_high.png", imgName]] forState:UIControlStateHighlighted]; Thursday, January 26, 12
  • 7. UISCROLLVIEW Навигация до определен обект [scrollView scrollRectToVisible:temp animated:NO]; Thursday, January 26, 12
  • 8. MODAL VIEWS Different view hierarchy Thursday, January 26, 12
  • 9. ЗА КАКВО СЕ ИЗПОЛЗВАТ? • Незабавно събиране на информация от потребителя • Временно показване на съдържание • Промяна на работната среда • Различни интерфейси за различните ориентации • Нова иерархия от UIView Thursday, January 26, 12
  • 10. current task or workflow. To learn more about defining a modal view in your code, see UIViewController Class Reference . MODAL VIEW Appearance and Behavior A modal view occupies the entire application screen, which strengthens the user’s perception of entering a Необходим е отговор преди потребителят да може да separate, transient mode in which they can accomplish something. On iPad, a modal view might also occupy the entire area of a parent view, such as a popover. продължи the controls necessary to perform the task. A modal A modal view can display text if appropriate, and contains view generally displays a button that completes the task and dismisses the view, and a Cancel button users Thursday, January 26, 12 can tap to abandon the task.
  • 11. MODALVIEW УПОТРЕБА Transition Thursday, January 26, 12
  • 12. ЗА КАКВО СЕ ИЗПОЛЗВА? Drawing canvas писане на писмо Drawing canvas временно представяне Organizer Help Thursday, January 26, 12
  • 13. UIModalPresentati Presenting View Controllers From Other View Controllers Configuring the Presentation Style for Modal Views IPAD PRESENTATION STYLES Figure 9-4 iPad presentation styles UIModalPresentationFullScreen UIModalPresentati Presenting View Controllers From Other View Controllers Configuring the Presentation Style for Modal Views Figure 9-4 iPad presentation styles UIModalPresentationFullScreen UIModalPresentationPageSheet UIModalPresentati For guidance on when to use the different presentation styles, see “Po Guidelines . UIModalPresentationFullScreenUIModalPresentationPageSheet UIModalPresentationPageSheet UIModalPresentationFormSheet UIModalPresentationFormSheet 2012-‐01-‐09 | © 2012 Apple Inc. All Rights Rese 85 For guidance on when to use the different presentation styles, see “Popover (iPad Only)” in iOS Human Interface Guidelines . UIModalPresentationFormSheet 2012-‐01-‐09 | © 2012 Apple Inc. All Rights Reserved. Thursday, January 26, 12
  • 14. IDESK - SEND EMAIL Thursday, January 26, 12
  • 15. Presenting View Controllers From Other View Controllers About View Controller Presentation PRESENT MODAL and then presents another view controller (the people picker) in response to that action. Selecting a contact (or canceling the people picker) dismisses that interface and takes the user back to the photo library. Tapping the Done button then dismisses the photo library and takes the user back to the camera interface. Figure 9-2 Creating a chain of modal view controllers Camera Photo library Action sheet People picker view controller navigation controller navigation controller present present modally modally Each view controller in a chain of presented view controllers has pointers to the other objects surrounding it Thursday, January 26, 12
  • 16. TRANSITIONS Vertical slide Flip PartialCurl Thursday, January 26, 12
  • 17. NAVIGATION OR MODAL Как да изберем? Thursday, January 26, 12
  • 18. NAVIGATION / MODAL VIEW Необходимо е потребителят да въведе текст Thursday, January 26, 12
  • 19. NAVIGATION / MODAL VIEW Thursday, January 26, 12
  • 20. NAVIGATIONCONTROLLER push push push pop pop pop [self.navigationController pushViewController:tableVC animated:YES]; [self.navigationController popViewControllerAnimated:YES]; Thursday, January 26, 12
  • 21. РАЗЛИКАТА push push push pop pop pop present dismiss Thursday, January 26, 12
  • 22. MODALVIEWCONTROLLER present dismiss [self presentModalViewController:tableVC animated:YES]; [self dismissModalViewControllerAnimated:YES]; Thursday, January 26, 12
  • 23. ЗА СЛЕДВАЩИЯТ ПЪТ • nsnotification & targets • blocks • nstimer • mapKit Thursday, January 26, 12