<commit_before># -*- coding: utf-8 -*-
module HBFav2
  class UIViewController < UIViewController
    attr_accessor :tracked_view_name
    include HBFav2::HomeCondition
    include HBFav2::BackGesture
    include HBFav2::BackgroundEvent

    def viewDidLoad
      super
      configure_back_gesture
    end

    def viewDidAppear(animated)
      super
      self.navigationItem.backBarButtonItem = NavigationBackButton.create
    end
  end
end<commit_msg>[iPad] rotate View frame when rotate the device<commit_after># -*- coding: utf-8 -*-
module HBFav2
  class UIViewController < UIViewController
    attr_accessor :tracked_view_name
    include HBFav2::HomeCondition
    include HBFav2::BackGesture
    include HBFav2::BackgroundEvent

    def viewDidLoad
      super
      configure_back_gesture
    end

    def viewDidAppear(animated)
      super
      self.navigationItem.backBarButtonItem = NavigationBackButton.create
    end

    def willAnimateRotationToInterfaceOrientation(orientation, duration:duration)
      # FIXME : Just rotate. need better way for iOS 7.
      v = self.view.subviews.first
      frame = v.frame
      v.frame = CGRectMake(0, 0, frame.size.height, frame.size.width)
    end

    def viewWillTransitionToSize(size, withTransitionCoordinator:coordinator)
      v = self.view.subviews.first
      v.frame = CGRectMake(0, 0, size.width, size.height)
    end
  end
end
{'fraction_non_alphanumeric': 0.06876790830945559, 'fraction_numerical': 0.010744985673352435, 'mean_word_length': 3.325077399380805, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '407482', 'n_tokens_mistral': 437, 'n_tokens_neox': 412, 'n_words': 97}