import UIKit
import XuniCalendarKit
class ViewController: UIViewController {
var calendar = XuniCalendar(frame: CGRect.zero)
override func viewDidLoad() {
super.viewDidLoad()
// ビューを読み込んだ後の追加セットアップを行います。
self.view.addSubview(calendar)
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
let size = self.view.bounds.size
let width = min(size.width, size.height)
calendar.frame = CGRect(x: 0, y: 75, width: width, height: width - 75)
}
}
#import "ViewController.h"
#import "XuniCalendarKit/XuniCalendarKit.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// ビューを読み込んだ後の追加セットアップを行います(通常は nib から)。
XuniCalendar *calendar = [[XuniCalendar alloc] initWithFrame:CGRectZero];
calendar.tag = 1;
[self.view addSubview:calendar];
}
- (void)viewDidLayoutSubviews {
[super viewDidLayoutSubviews];
CGSize size = self.view.bounds.size;
CGFloat width = fminf(size.width, size.height);
XuniCalendar *calendar = (XuniCalendar *)[self.view viewWithTag:1];
calendar.frame = CGRectMake(0, 55, width, width - 55);
}
@end
using System;
using Xuni.iOS.Calendar;
using UIKit;
namespace Xuni_QuickStart
{
public partial class ViewController : UIViewController
{
protected ViewController(IntPtr handle) : base(handle)
{
}
public override void ViewDidLoad()
{
base.ViewDidLoad();
Xuni.iOS.Core.XuniLicenseManager.Key = License.Key;
XuniCalendar calendar = new XuniCalendar();
calendar.Frame = new CoreGraphics.CGRect(0, 20, this.View.Bounds.Width, this.View.Bounds.Height-20);
this.View.AddSubviews(calendar);
}
public override void DidReceiveMemoryWarning()
{
base.DidReceiveMemoryWarning();
}
}
}