I have studied two methods one cross-validation and other is PCA.

cross-validation- It helps us to choose the tuning parameter of the model which increase the performance of the model on test data set.

PCA- It reduces the number of predictors into a manageable size and each component is the linear combination predicators .

There is always one problem in PCA to decide the number of components.What I want to know is it possible to use cross-validation for finding the number of principal components.