mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

In the `examples/platform_view` example, which demonstrates transitioning from a Flutter view to a general iOS UIView and back, as well as using channels to communicate between the two, the Flutter view renders correctly, but in the iOS UIView, the FAB equivalent button in the lower-right corner is rendered without the '+' icon. This is because no binding as declared for the add icon in the storyboard. This adds the missing binding. Further, this eliminates the use of the deprecated [UIButtonTypeRoundedRect](https://developer.apple.com/documentation/uikit/uibuttontype/uibuttontyperoundedrect?language=objc), falling back to the default instead. --------- Co-authored-by: Chris Bracken <chris@bracken.jp>
16 lines
505 B
Objective-C
16 lines
505 B
Objective-C
// Copyright 2014 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
@protocol PlatformViewControllerDelegate <NSObject>
|
|
- (void)didUpdateCounter:(int)counter;
|
|
@end
|
|
|
|
@interface PlatformViewController : UIViewController
|
|
@property(weak, nonatomic) IBOutlet UIButton* incrementButton;
|
|
@property(strong, nonatomic) id<PlatformViewControllerDelegate> delegate;
|
|
@property int counter;
|
|
@end
|