SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Ähnlich wie iOS Tips + ModalVC

Learn swiftla animations
Learn swiftla animationsLearn swiftla animations
Learn swiftla animationsRaghav Mangrola
 
Core animation taobao
Core animation taobaoCore animation taobao
Core animation taobaoyarshure Kong
 
CFUGbe talk about Angular JS
CFUGbe talk about Angular JSCFUGbe talk about Angular JS
CFUGbe talk about Angular JSAlwyn Wymeersch
 
L0020 - The Basic RCP Application
L0020 - The Basic RCP ApplicationL0020 - The Basic RCP Application
L0020 - The Basic RCP ApplicationTonny Madsen
 
Optimize CollectionView Scrolling
Optimize CollectionView ScrollingOptimize CollectionView Scrolling
Optimize CollectionView ScrollingAndrea 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 AppMichele Capra
 
Integrating Angular js & three.js
Integrating Angular js & three.jsIntegrating Angular js & three.js
Integrating Angular js & three.jsJosh 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 GraphicsAravindhan Anbazhagan
 
AngularJS intro
AngularJS introAngularJS intro
AngularJS introdizabl
 
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/ObjectiveCJohnKennedy
 
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 ViewVu Tran Lam
 
Android Wear Essentials
Android Wear EssentialsAndroid Wear Essentials
Android Wear EssentialsNilhcem
 
Lesson10
Lesson10Lesson10
Lesson10renguzi
 
Daniel Jalkut - dotSwift 2019
Daniel Jalkut - dotSwift 2019Daniel Jalkut - dotSwift 2019
Daniel Jalkut - dotSwift 2019DanielJalkut
 

Ähnlich wie 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
 

Mehr von 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 ViewsMarian Ignev
 
iOS Memory management & Navigation
iOS Memory management & NavigationiOS Memory management & Navigation
iOS Memory management & NavigationMarian Ignev
 
iOS Architecture and MVC
iOS Architecture and MVCiOS Architecture and MVC
iOS Architecture and MVCMarian Ignev
 
iOS Development - Intro
iOS Development - IntroiOS Development - Intro
iOS Development - IntroMarian Ignev
 

Mehr von 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
 

Kürzlich hochgeladen

Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 

Kürzlich hochgeladen (20)

Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 

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