flutter/examples/platform_view/ios/Runner/PlatformViewController.h
Roger 609d30fe58
bind missing add icon in platform_view example (#132028)
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>
2024-02-27 11:19:52 -08:00

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