Skip to content

issue in layout  #9

@harshilkotecha

Description

@harshilkotecha

i have use this library in my project this really good lib. for language change with animation .
i have one problem with textField text field data not display in some case.

Uploading Simulator Screen Shot - iPhone SE - 2018-04-28 at 17.30.14.png…

here i have one text field and text is not display .

Localizer.swift
/// Exchange the implementation of two methods of the same Class
func MethodSwizzleGivenClassName(cls: AnyClass, originalSelector: Selector, overrideSelector: Selector) {
    let origMethod: Method = class_getInstanceMethod(cls, originalSelector)!
    let overrideMethod: Method = class_getInstanceMethod(cls, overrideSelector)!
    if (class_addMethod(cls, originalSelector, method_getImplementation(overrideMethod), method_getTypeEncoding(overrideMethod))) {
        class_replaceMethod(cls, overrideSelector, method_getImplementation(origMethod), method_getTypeEncoding(origMethod))
    } else {
        //method_exchangeImplementations(origMethod, overrideMethod)
    }
}

after comment this method_exchangeImplementations line it is working fine . can you suggest alternative for this code ? or explain me what is the roll of this method ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions